# HG changeset patch # User Martin Rudalics # Date 1174729387 0 # Node ID 9522301cee68b1bb297e581f1ab87d793a96c9a0 # Parent 79a8b64c82356d0a8436d56a6b2ffbbe4d106094 (Man-support-local-filenames): Assure that default-directory exists when doing call-process. diff -r 79a8b64c8235 -r 9522301cee68 lisp/man.el --- a/lisp/man.el Sat Mar 24 02:11:34 2007 +0000 +++ b/lisp/man.el Sat Mar 24 09:43:07 2007 +0000 @@ -628,7 +628,14 @@ (setq Man-support-local-filenames (with-temp-buffer (and (equal (condition-case nil - (call-process manual-program nil t nil "--help") + (let ((default-directory + ;; Assure that `default-directory' exists + ;; and is readable. + (if (and (file-directory-p default-directory) + (file-readable-p default-directory)) + default-directory + (expand-file-name "~/")))) + (call-process manual-program nil t nil "--help")) (error nil)) 0) (progn