Mercurial > hg > xemacs-beta
diff lisp/packages/man.el @ 183:e121b013d1f0 r20-3b18
Import from CVS: tag r20-3b18
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:54:23 +0200 |
parents | bfd6434d15b3 |
children | 489f57a838ef |
line wrap: on
line diff
--- a/lisp/packages/man.el Mon Aug 13 09:53:23 2007 +0200 +++ b/lisp/packages/man.el Mon Aug 13 09:54:23 2007 +0200 @@ -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)