emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs/lisp man.el


From: Kevin Ryde
Subject: [Emacs-diffs] emacs/lisp man.el
Date: Sat, 26 Dec 2009 22:00:47 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Kevin Ryde <kryde>      09/12/26 22:00:47

Modified files:
        lisp           : man.el 

Log message:
        (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.)

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/man.el?cvsroot=emacs&r1=1.195&r2=1.196

Patches:
Index: man.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/man.el,v
retrieving revision 1.195
retrieving revision 1.196
diff -u -b -r1.195 -r1.196
--- man.el      26 Dec 2009 21:32:51 -0000      1.195
+++ man.el      26 Dec 2009 22:00:47 -0000      1.196
@@ -1197,6 +1197,18 @@
                                                  (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))))




reply via email to

[Prev in Thread] Current Thread [Next in Thread]