summaryrefslogtreecommitdiff
path: root/lisp/man.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2010-02-11 11:00:01 -0500
committerStefan Monnier <monnier@iro.umontreal.ca>2010-02-11 11:00:01 -0500
commitc07ff221194a2d27346fb7fa3d4c8a877d3db66d (patch)
tree1a20b4b840411ff6d36ba9968a0a85dd264215d3 /lisp/man.el
parentac9ffe99b50fd826e6f332f931be287e75194273 (diff)
downloademacs-c07ff221194a2d27346fb7fa3d4c8a877d3db66d.tar.gz
(Man-completion-table): Don't signal an error if we can't run
manual-program (bug#4056).
Diffstat (limited to 'lisp/man.el')
-rw-r--r--lisp/man.el9
1 files changed, 7 insertions, 2 deletions
diff --git a/lisp/man.el b/lisp/man.el
index e729e11b6ca..dd64fbda574 100644
--- a/lisp/man.el
+++ b/lisp/man.el
@@ -771,8 +771,13 @@ POS defaults to `point'."
;; 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))