1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-24 07:20:37 +00:00

Only output the man page name on failures

* man.el (Man-bgproc-sentinel): Skip any arguments and only output
the man page name.

Fixes: debbugs:6935
This commit is contained in:
Lars Magne Ingebrigtsen 2011-07-14 19:39:00 +02:00
parent 0bb2392728
commit d1583c48e5
2 changed files with 16 additions and 5 deletions

View File

@ -10,6 +10,9 @@
2011-07-14 Lars Magne Ingebrigtsen <larsi@gnus.org>
* man.el (Man-bgproc-sentinel): Skip any arguments and only output
the man page name (bug#7929).
* image.el (put-image): Mention the `put-image' overlay property
(bug#7834).

View File

@ -1257,12 +1257,20 @@ manpage command."
(Man-mode)
(if (not Man-page-list)
(let ((args Man-arguments))
(let ((args Man-arguments))
(kill-buffer (current-buffer))
(error "Can't find the %s manpage" args)))
(set-buffer-modified-p nil)
))
(error "Can't find the %s manpage"
;; Skip arguments and only print the page name.
(mapconcat
'identity
(delete nil
(mapcar
(lambda (elem)
(and (not (string-match "^-" elem))
elem))
(split-string args " ")))
" ")))
(set-buffer-modified-p nil))))
;; Restore case-fold-search before calling
;; Man-notify-when-ready because it may switch buffers.