From xemacs-m  Tue Aug 12 19:09:40 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 TAA06047
	for <xemacs-beta@xemacs.org>; Tue, 12 Aug 1997 19:09:37 -0500 (CDT)
Received: (from karlheg@localhost)
	by bittersweet.inetarena.com (8.8.6/8.8.6/Debian/GNU) id RAA10623;
	Tue, 12 Aug 1997 17:10:16 -0700
To: XEmacs Beta <xemacs-beta@xemacs.org>
Subject: [patch] The promised `man.el' fixups.
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_Tue_Aug_12_17:10:16_1997-1"
Content-Transfer-Encoding: 7bit
From: karlheg@inetarena.com (Karl M. Hegbloom)
Date: 12 Aug 1997 17:10:16 -0700
Message-ID: <87vi1bx7rr.fsf@bittersweet.inetarena.com>
Lines: 103
X-Mailer: Gnus v5.4.64/XEmacs 20.3(beta17) - "Bucharest"

--Multipart_Tue_Aug_12_17:10:16_1997-1
Content-Type: text/plain; charset=US-ASCII

1997-08-12  Karl M. Hegbloom  <karlheg@inetarena.com>

	* packages/man.el (Manual-mouseify-xrefs): Skip the top line of
 	manual entries so to not get the all-caps pseudo xrefs in the
 	heading in our list of manuals.
	(Manual-buffers-have-stars): new customize option.
	(manual-entry): Fix to utilize the new variable, and to not put
 	stars around manual names put in the minibuffer history.


--Multipart_Tue_Aug_12_17:10:16_1997-1
Content-Type: text/plain; charset=US-ASCII

Index: lisp/packages/man.el
===================================================================
RCS file: /usr/local/cvsroot/xemacs-20/lisp/packages/man.el,v
retrieving revision 1.1.1.2.2.3
diff -u -r1.1.1.2.2.3 man.el
--- man.el	1997/08/07 09:09:56	1.1.1.2.2.3
+++ man.el	1997/08/13 00:02:51
@@ -70,6 +70,13 @@
   :type 'boolean
   :group 'man)
 
+(defcustom Manual-buffers-have-stars nil
+  "*When T, manual page buffers are always named like *man*.
+Otherwise, they are not if `buffers-menu-submenus-for-groups-p' is T,
+so that Manual-mode buffers will have their own submenu."
+  :type 'boolean
+  :group 'man)
+
 (defcustom Manual-use-rosetta-man (not (null (locate-file "rman" exec-path))) "\
 If non-nil, use RosettaMan (rman) to filter man pages.
 This makes man-page cleanup virtually instantaneous, instead of
@@ -202,9 +209,10 @@
 
     (let ((bufname (flet
 		       ((maybe-star ()
-				    (if buffers-menu-submenus-for-groups-p
-					""
-				      "*")))
+		          (if (or Manual-buffers-have-stars
+				  (not buffers-menu-submenus-for-groups-p))
+			      "*"
+			    "")))
 		     (if apropos-mode
 			 (concat (maybe-star) "man apropos " topic (maybe-star))
 		       (concat (maybe-star)
@@ -261,15 +269,9 @@
 		   (message "%s (done.)" args-string))
 		 (set-buffer-modified-p nil)
 		 (Manual-mode)))))
-
-      (let ((page (flet
-		      ((maybe-star ()
-				   (if buffers-menu-submenus-for-groups-p
-				       ""
-				     "*")))
-		    (if section
-			(concat (maybe-star) topic "(" section ")" (maybe-star))
-		      topic))))
+      (let ((page (if section
+		      (concat topic "(" section ")")
+		    topic)))
 	(setq Manual-page-history
 	      (cons (buffer-name)
 		    (delete (buffer-name) Manual-page-history))
@@ -513,6 +515,8 @@
 
 (defun Manual-mouseify-xrefs ()
   (goto-char (point-min))
+  ;; skip the top line of manual pages, but not apropos listings.
+  (unless apropos-mode (forward-line 1))
   (let ((case-fold-search nil)
 	s e name splitp extent)
     ;; possibly it would be faster to rewrite this expression to search for
@@ -528,7 +532,6 @@
 
       (goto-char s)
       ;; if this is a hyphenated xref, we're on the second line, 1st char now.
-
       (when (progn
 	      (beginning-of-line)
 	      (and (looking-at (concat "^[ \t]+" (regexp-quote name)))
@@ -650,9 +653,10 @@
 		(setq manpage "???"))
 	      (flet
 		  ((maybe-star ()
-			       (if buffers-menu-submenus-for-groups-p
-				   "*"
-				 "")))
+		     (if (or Manual-buffers-have-stars
+			     (not buffers-menu-submenus-for-groups-p))
+			 "*"
+		       "")))
 		(setq buffer
 		      (rename-buffer
 		       (generate-new-buffer-name (concat (maybe-star)

--Multipart_Tue_Aug_12_17:10:16_1997-1--

