viteno  committed 2310354

Suggestions by Jeff Mincy in

  • Participants
  • Parent commits 96b556c

Comments (0)

Files changed (2)

+2004-04-25  Jeff Mincy  <>
+	* 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  <>
 	* align.el: Sync align.el with current GNU Emacs CVS to fix bug in
 (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."
    (list (let* ((default (save-excursion
 	(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))
 			   (kill-buffer (current-buffer))
 			   (error "%s not found" args-string)))
 (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)