diff options
| author | Karl Heuer | 1997-11-17 01:56:15 +0000 |
|---|---|---|
| committer | Karl Heuer | 1997-11-17 01:56:15 +0000 |
| commit | fd5733a94b26898952b004eae93d9d6c4250eb85 (patch) | |
| tree | fcd5d80424982bc7b8660825fc6d6c4dab88919b | |
| parent | 3fb7b5883f37263955def0d98ca21d1d5697f56a (diff) | |
| download | emacs-fd5733a94b26898952b004eae93d9d6c4250eb85.tar.gz emacs-fd5733a94b26898952b004eae93d9d6c4250eb85.zip | |
(Man-init-defvars, Man-build-man-command):
Bind default-directory to "/" to avoid possible error in call-process.
| -rw-r--r-- | lisp/man.el | 26 |
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." | |||
| 362 | (setq Man-fontify-manpage-flag (and Man-fontify-manpage-flag | 362 | (setq Man-fontify-manpage-flag (and Man-fontify-manpage-flag |
| 363 | window-system)) | 363 | window-system)) |
| 364 | 364 | ||
| 365 | (setq Man-sed-script | 365 | ;; Avoid possible error in call-process by using a directory that must exist. |
| 366 | (cond | 366 | (let ((default-directory "/")) |
| 367 | (Man-fontify-manpage-flag | 367 | (setq Man-sed-script |
| 368 | nil) | 368 | (cond |
| 369 | ((= 0 (call-process Man-sed-command nil nil nil Man-sysv-sed-script)) | 369 | (Man-fontify-manpage-flag |
| 370 | Man-sysv-sed-script) | 370 | nil) |
| 371 | ((= 0 (call-process Man-sed-command nil nil nil Man-berkeley-sed-script)) | 371 | ((= 0 (call-process Man-sed-command nil nil nil Man-sysv-sed-script)) |
| 372 | Man-berkeley-sed-script) | 372 | Man-sysv-sed-script) |
| 373 | (t | 373 | ((= 0 (call-process Man-sed-command nil nil nil Man-berkeley-sed-script)) |
| 374 | nil))) | 374 | Man-berkeley-sed-script) |
| 375 | (t | ||
| 376 | nil)))) | ||
| 375 | 377 | ||
| 376 | (setq Man-filter-list | 378 | (setq Man-filter-list |
| 377 | (list | 379 | (list |
| @@ -575,7 +577,9 @@ If a buffer already exists for this man page, it will display immediately." | |||
| 575 | (set-buffer buffer) | 577 | (set-buffer buffer) |
| 576 | (setq Man-original-frame (selected-frame)) | 578 | (setq Man-original-frame (selected-frame)) |
| 577 | (setq Man-arguments man-args)) | 579 | (setq Man-arguments man-args)) |
| 578 | (let ((process-environment (copy-sequence process-environment))) | 580 | (let ((process-environment (copy-sequence process-environment)) |
| 581 | ;; Avoid possible error by using a directory that always exists. | ||
| 582 | (default-directory "/")) | ||
| 579 | ;; Prevent any attempt to use display terminal fanciness. | 583 | ;; Prevent any attempt to use display terminal fanciness. |
| 580 | (setenv "TERM" "dumb") | 584 | (setenv "TERM" "dumb") |
| 581 | (if (fboundp 'start-process) | 585 | (if (fboundp 'start-process) |