changeset 107131:741ff2bdfe79

(Man-completion-table): Don't signal an error if we can't run manual-program (bug#4056).
author Stefan Monnier <monnier@iro.umontreal.ca>
date Thu, 11 Feb 2010 11:00:01 -0500
parents a893ab84387d
children 6429fc34756a
files lisp/ChangeLog lisp/man.el
diffstat 2 files changed, 12 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Wed Feb 10 20:13:39 2010 -0800
+++ b/lisp/ChangeLog	Thu Feb 11 11:00:01 2010 -0500
@@ -1,3 +1,8 @@
+2010-02-11  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* man.el (Man-completion-table): Don't signal an error if we can't run
+	manual-program (bug#4056).
+
 2010-02-10  Juanma Barranquero  <lekktu@gmail.com>
 
 	* textmodes/artist.el (artist-mt): Fix typos in docstring.
--- a/lisp/man.el	Wed Feb 10 20:13:39 2010 -0800
+++ b/lisp/man.el	Thu Feb 11 11:00:01 2010 -0500
@@ -771,8 +771,13 @@
           ;; quote anything.
           (let ((process-environment (copy-sequence process-environment)))
             (setenv "COLUMNS" "999") ;; don't truncate long names
-            (call-process manual-program nil '(t nil) nil
-                          "-k" (concat "^" prefix)))
+            ;; manual-program might not even exist.  And since it's
+            ;; run differently in Man-getpage-in-background, an error
+            ;; here may not necessarily mean that we'll also get an
+            ;; error later.
+            (ignore-errors
+              (call-process manual-program nil '(t nil) nil
+                            "-k" (concat "^" prefix))))
           (goto-char (point-min))
           (while (re-search-forward "^\\([^ \t\n]+\\)\\(?: ?\\((.+?)\\)\\(?:[ \t]+- \\(.*\\)\\)?\\)?" nil t)
             (push (propertize (concat (match-string 1) (match-string 2))