Commits

viteno  committed 2310354

Suggestions by Jeff Mincy in
<16503.6567.466292.311246@brain.delphioutpost.com>.

  • Participants
  • Parent commits 96b556c

Comments (0)

Files changed (2)

+2004-04-25  Jeff Mincy  <jeff@delphioutpost.com>
+
+	* man.el (manual-entry): Document '-k' option.  Accept fewer
+	characters of output in apropos-mode.
+	(Manual-nuke-nroff-bs): Handle rman correctly.
+
 2004-04-24  Adrian Aichner  <adrian@xemacs.org>
 
 	* align.el: Sync align.el with current GNU Emacs CVS to fix bug in
 
 ;;;###autoload
 (defun manual-entry (topic &optional arg silent)
-  "Display the Unix manual entry (or entries) for TOPIC."
+  "Display the Unix manual entry (or entries) for TOPIC.
+If TOPIC starts with -k, then a system apropos search is performed
+using man -k for TOPIC."
   (interactive
    (list (let* ((default (save-excursion
 			   (buffer-substring
 	(if (and section (string-match "\\`\\([0-9]+\\)[^0-9]" section))
 	    (setq section (match-string 1 section))))
 
-      (if (equal section "-k")
+      (if (or (equal section "-k") (member "-k" Manual-switches))
 	  (setq apropos-mode t))
 
       (let ((bufname (concat "Man"
 		     (message "%s (running...)" args-string)
 		     (apply 'call-process Manual-program nil '(t nil) nil args)
 
-		     (if (< (buffer-size) 200)
+		     (if (< (buffer-size) (if apropos-mode 20 200))
 			 (progn
 			   (kill-buffer (current-buffer))
 			   (error "%s not found" args-string)))
 ;;;###autoload
 (defun Manual-nuke-nroff-bs (&optional apropos-mode)
   (interactive "*")
-  (if Manual-use-rosetta-man
+  (if (and Manual-use-rosetta-man (not apropos-mode))
       (call-process-region (point-min) (point-max)
                            Manual-use-rosetta-man t t nil)
     ;;