Mercurial > emacs
changeset 20266:450fdcb00733
(Man-init-defvars, Man-build-man-command):
Bind default-directory to "/" to avoid possible error in call-process.
author | Karl Heuer <kwzh@gnu.org> |
---|---|
date | Mon, 17 Nov 1997 01:56:15 +0000 |
parents | 37a6af24de93 |
children | 6a9f60f7e241 |
files | lisp/man.el |
diffstat | 1 files changed, 15 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/man.el Sat Nov 15 21:14:21 1997 +0000 +++ b/lisp/man.el Mon Nov 17 01:56:15 1997 +0000 @@ -362,16 +362,18 @@ (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 @@ (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)