diff options
author | Kevin Ryde <user42@zip.com.au> | 2009-12-26 22:00:47 +0000 |
---|---|---|
committer | Kevin Ryde <user42@zip.com.au> | 2009-12-26 22:00:47 +0000 |
commit | 69bcb1f3b2065231849af71fbec2505aad407012 (patch) | |
tree | e9dbdac4d42e2d9f6c3173a5ac0bb4f757cfe06f /lisp/man.el | |
parent | b58dd7079340909d63f6d729b1d16025059db82f (diff) | |
download | emacs-69bcb1f3b2065231849af71fbec2505aad407012.tar.gz |
(Man-bgproc-sentinel): When "-k foo" produces no output show error
"no matches" rather than "Can't find manpage", as the latter reads
like -k was interpreted as a page name, which is not so. (My
bug#5431.)
Diffstat (limited to 'lisp/man.el')
-rw-r--r-- | lisp/man.el | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lisp/man.el b/lisp/man.el index a5d62f3fb81..b34ca768707 100644 --- a/lisp/man.el +++ b/lisp/man.el @@ -1197,6 +1197,18 @@ manpage command." (progn (end-of-line) (point))) delete-buff t)) + + ;; "-k foo", successful exit, but no output (from man-db) + ;; ENHANCE-ME: share the check for -k with + ;; `Man-highlight-references'. The \\s- bits here are + ;; meant to allow for multiple options with -k among them. + ((and (string-match "\\(\\`\\|\\s-\\)-k\\s-" Man-arguments) + (eq (process-status process) 'exit) + (= (process-exit-status process) 0) + (= (point-min) (point-max))) + (setq err-mess (format "%s: no matches" Man-arguments) + delete-buff t)) + ((or (stringp process) (not (and (eq (process-status process) 'exit) (= (process-exit-status process) 0)))) |