diff options
author | Lars Magne Ingebrigtsen <larsi@gnus.org> | 2011-07-14 19:39:00 +0200 |
---|---|---|
committer | Lars Magne Ingebrigtsen <larsi@gnus.org> | 2011-07-14 19:39:00 +0200 |
commit | d1583c48e5bee8a865a78fe1db71dc8c46b40422 (patch) | |
tree | b5887e6610d1455ff208f5d7efeecce9cc57aadd /lisp/man.el | |
parent | 0bb2392728c10748f3376f8cef6d9ca53e29f464 (diff) | |
download | emacs-d1583c48e5bee8a865a78fe1db71dc8c46b40422.tar.gz |
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
Diffstat (limited to 'lisp/man.el')
-rw-r--r-- | lisp/man.el | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/lisp/man.el b/lisp/man.el index b5a70395e59..8782b22c804 100644 --- a/lisp/man.el +++ b/lisp/man.el @@ -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. |