From xemacs-m  Sun Jul 13 05:52:17 1997
Received: from bittersweet.inetarena.com (karlheg@bittersweet.inetarena.com [206.129.216.38])
	by xemacs.org (8.8.5/8.8.5) with ESMTP id FAA12247
	for <xemacs-beta@xemacs.org>; Sun, 13 Jul 1997 05:52:15 -0500 (CDT)
Received: (from karlheg@localhost)
	by bittersweet.inetarena.com (8.8.5/8.8.5) id DAA20589;
	Sun, 13 Jul 1997 03:51:46 -0700
To: XEmacs Beta <xemacs-beta@xemacs.org>
Subject: [PATCH] `Manual-page-minibuffer-history'
X-Face: /Q}=yl}1_v7nP)xXo5XjG8+tl@=uVu7o5u6)f]zN?+<hB!K.m9:[|*p34jVN`O;:XZXVSy>/\R>qDt(t8w!-i{(y0"`jFw^uk8inzO9wXabd'CdjUWfC\GHi:6nO*YC89#-qD>Q4r%9!V"<RYJ=7D#$";q=zML5'!=wvXk^$`6FT=5CMofQX)WUKt0p:OKl.mFOXx/D
Mime-Version: 1.0 (generated by tm-edit 7.108)
Content-Type: multipart/mixed;
 boundary="Multipart_Sun_Jul_13_03:51:46_1997-1"
Content-Transfer-Encoding: 7bit
From: karlheg+xemacs@inetarena.com (Karl M. Hegbloom)
Date: 13 Jul 1997 03:51:46 -0700
Message-ID: <87oh87ql6l.fsf@bittersweet.inetarena.com>
Lines: 110
X-Mailer: Gnus v5.4.62/XEmacs 20.3(beta12) - "Helsinki"

--Multipart_Sun_Jul_13_03:51:46_1997-1
Content-Type: text/plain; charset=US-ASCII


1997-07-13  Karl M. Hegbloom  <karlheg@inetarena.com>

	* packages/man.el: (manual-entry) Added `Manual-page-
 	minibuffer-history', and added it to the read-string statement.
  	Added #\: to `fmh' so that manuals named like MIME::Parser(3) are
 	found at point.
	(Manual-mouseify-xrefs) Fixed it so now it will mousify the manual
 	entry on the first line of an apropos listing.


 (Is there a MIME type so we can click and have it run a patch?)


--Multipart_Sun_Jul_13_03:51:46_1997-1
Content-Type: text/plain; charset=US-ASCII

--- lisp/packages/man.el.orig	Sun Jul 13 02:09:04 1997
+++ lisp/packages/man.el	Sun Jul 13 03:50:00 1997
@@ -57,6 +57,8 @@
 (defvar Manual-page-history nil "\
 A list of names of previously visited man page buffers.")
 
+(defvar Manual-page-minibuffer-history nil "\
+Minibuffer completion history for `manual-entry'.")
 
 ;; New variables.
 
@@ -165,7 +167,7 @@
 (defun manual-entry (topic &optional arg silent)
   "Display the Unix manual entry (or entries) for TOPIC."
   (interactive
-   (list (let* ((fmh "-A-Za-z0-9_.")
+   (list (let* ((fmh "-A-Za-z0-9_.:")
 		(default (save-excursion
 			   (buffer-substring
 			    (progn
@@ -174,7 +176,8 @@
 			    (progn (skip-chars-forward fmh) (point)))))
 		(thing (read-string
 			(if (equal default "") "Manual entry: "
-			  (concat "Manual entry: (default " default ") ")))))
+			  (concat "Manual entry: (default " default ") "))
+			nil 'Manual-page-minibuffer-history)))
 	   (if (equal thing "") default thing))
 	 (prefix-numeric-value current-prefix-arg)))
   ;;(interactive "sManual entry (topic): \np")
@@ -488,26 +491,29 @@
 
 (defun Manual-mouseify-xrefs ()
   (goto-char (point-min))
-  (forward-line 1)
   (let ((case-fold-search nil)
 	s e name extent)
     ;; possibly it would be faster to rewrite this expression to search for
     ;; a less common sequence first (like "([0-9]") and then back up to see
     ;; if it's really a match.  This function is 15% of the total time, 13%
     ;; of which is this call to re-search-forward.
-    (while (re-search-forward "[a-zA-Z_][-a-zA-Z0-9_.]*([0-9][a-zA-Z0-9]*)"
+    (while (re-search-forward "[a-zA-Z_][-a-zA-Z0-9_.:]*([0-9][a-zA-Z0-9]*)"
 			      nil t)
       (setq s (match-beginning 0)
 	    e (match-end 0)
 	    name (buffer-substring s e))
       (goto-char s)
       (skip-chars-backward " \t")
-      (if (and (bolp)
-	       (progn (backward-char 1) (= (preceding-char) ?-)))
+      (if (and (bolp) (not (bobp))
+	       (progn (backward-char 1) (equal (char-before) ?-)))
 	  (progn
 	    (setq s (point))
-	    (skip-chars-backward "-a-zA-Z0-9_.")
-	    (setq name (concat (buffer-substring (point) (1- s)) name))
+	    (skip-chars-backward "-a-zA-Z0-9_.:")
+	    (setq name (concat (buffer-substring (point)
+						 (if (>= s 0)
+						     (1- s)
+						   0))
+			       name))
 	    (setq s (point))))
       ;; if there are upper case letters in the section, downcase them.
       (if (string-match "(.*[A-Z]+.*)$" name)

--Multipart_Sun_Jul_13_03:51:46_1997-1
Content-Type: text/plain; charset=US-ASCII

--- lisp/utils/savehist.el.orig	Sun Jul 13 02:38:34 1997
+++ lisp/utils/savehist.el	Sun Jul 13 02:38:57 1997
@@ -97,6 +97,7 @@
 
     ;; Info, lookup, and bookmark historys
     Info-minibuffer-history
+    Manual-page-minibuffer-history
 
     ;; GNU Emacs-specific:
     ;; Extended commands

--Multipart_Sun_Jul_13_03:51:46_1997-1
Content-Type: text/plain; charset=US-ASCII

mailto:karlheg+sig@inetarena.com (Karl M. Hegbloom)
http://www.inetarena.com/~karlheg
Portland, OR  USA
Debian GNU 1.3  Linux 2.1.36 AMD K5 PR-133

--Multipart_Sun_Jul_13_03:51:46_1997-1--

