summaryrefslogtreecommitdiff
path: root/lisp/man.el
diff options
context:
space:
mode:
authorKarl Heuer <kwzh@gnu.org>1997-11-17 01:56:15 +0000
committerKarl Heuer <kwzh@gnu.org>1997-11-17 01:56:15 +0000
commit694a6ca52af648946f39b0b4397cf521dd32877d (patch)
tree10a31d89f052538aee3ab268246b00dceae3ea67 /lisp/man.el
parent8749e31a0aaf564c923e366bae841a87eed622fe (diff)
downloademacs-694a6ca52af648946f39b0b4397cf521dd32877d.tar.gz
(Man-init-defvars, Man-build-man-command):
Bind default-directory to "/" to avoid possible error in call-process.
Diffstat (limited to 'lisp/man.el')
-rw-r--r--lisp/man.el26
1 files changed, 15 insertions, 11 deletions
diff --git a/lisp/man.el b/lisp/man.el
index a05e2462e4b..51cca38250e 100644
--- a/lisp/man.el
+++ b/lisp/man.el
@@ -362,16 +362,18 @@ This is necessary if one wants to dump man.el with emacs."
(setq Man-fontify-manpage-flag (and Man-fontify-manpage-flag
window-system))
- (setq Man-sed-script
- (cond
- (Man-fontify-manpage-flag
- nil)
- ((= 0 (call-process Man-sed-command nil nil nil Man-sysv-sed-script))
- Man-sysv-sed-script)
- ((= 0 (call-process Man-sed-command nil nil nil Man-berkeley-sed-script))
- Man-berkeley-sed-script)
- (t
- nil)))
+ ;; Avoid possible error in call-process by using a directory that must exist.
+ (let ((default-directory "/"))
+ (setq Man-sed-script
+ (cond
+ (Man-fontify-manpage-flag
+ nil)
+ ((= 0 (call-process Man-sed-command nil nil nil Man-sysv-sed-script))
+ Man-sysv-sed-script)
+ ((= 0 (call-process Man-sed-command nil nil nil Man-berkeley-sed-script))
+ Man-berkeley-sed-script)
+ (t
+ nil))))
(setq Man-filter-list
(list
@@ -575,7 +577,9 @@ If a buffer already exists for this man page, it will display immediately."
(set-buffer buffer)
(setq Man-original-frame (selected-frame))
(setq Man-arguments man-args))
- (let ((process-environment (copy-sequence process-environment)))
+ (let ((process-environment (copy-sequence process-environment))
+ ;; Avoid possible error by using a directory that always exists.
+ (default-directory "/"))
;; Prevent any attempt to use display terminal fanciness.
(setenv "TERM" "dumb")
(if (fboundp 'start-process)