diff options
| author | Lars Magne Ingebrigtsen | 2011-07-14 19:39:00 +0200 |
|---|---|---|
| committer | Lars Magne Ingebrigtsen | 2011-07-14 19:39:00 +0200 |
| commit | d1583c48e5bee8a865a78fe1db71dc8c46b40422 (patch) | |
| tree | b5887e6610d1455ff208f5d7efeecce9cc57aadd | |
| parent | 0bb2392728c10748f3376f8cef6d9ca53e29f464 (diff) | |
| download | emacs-d1583c48e5bee8a865a78fe1db71dc8c46b40422.tar.gz emacs-d1583c48e5bee8a865a78fe1db71dc8c46b40422.zip | |
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
| -rw-r--r-- | lisp/ChangeLog | 3 | ||||
| -rw-r--r-- | lisp/man.el | 18 |
2 files changed, 16 insertions, 5 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 936dab89ae5..ec8f794f211 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -10,6 +10,9 @@ | |||
| 10 | 10 | ||
| 11 | 2011-07-14 Lars Magne Ingebrigtsen <larsi@gnus.org> | 11 | 2011-07-14 Lars Magne Ingebrigtsen <larsi@gnus.org> |
| 12 | 12 | ||
| 13 | * man.el (Man-bgproc-sentinel): Skip any arguments and only output | ||
| 14 | the man page name (bug#7929). | ||
| 15 | |||
| 13 | * image.el (put-image): Mention the `put-image' overlay property | 16 | * image.el (put-image): Mention the `put-image' overlay property |
| 14 | (bug#7834). | 17 | (bug#7834). |
| 15 | 18 | ||
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." | |||
| 1257 | (Man-mode) | 1257 | (Man-mode) |
| 1258 | 1258 | ||
| 1259 | (if (not Man-page-list) | 1259 | (if (not Man-page-list) |
| 1260 | (let ((args Man-arguments)) | 1260 | (let ((args Man-arguments)) |
| 1261 | (kill-buffer (current-buffer)) | 1261 | (kill-buffer (current-buffer)) |
| 1262 | (error "Can't find the %s manpage" args))) | 1262 | (error "Can't find the %s manpage" |
| 1263 | 1263 | ;; Skip arguments and only print the page name. | |
| 1264 | (set-buffer-modified-p nil) | 1264 | (mapconcat |
| 1265 | )) | 1265 | 'identity |
| 1266 | (delete nil | ||
| 1267 | (mapcar | ||
| 1268 | (lambda (elem) | ||
| 1269 | (and (not (string-match "^-" elem)) | ||
| 1270 | elem)) | ||
| 1271 | (split-string args " "))) | ||
| 1272 | " "))) | ||
| 1273 | (set-buffer-modified-p nil)))) | ||
| 1266 | ;; Restore case-fold-search before calling | 1274 | ;; Restore case-fold-search before calling |
| 1267 | ;; Man-notify-when-ready because it may switch buffers. | 1275 | ;; Man-notify-when-ready because it may switch buffers. |
| 1268 | 1276 | ||