From fcbd9af64f977d532e5de7dd8d7bedd4e8c93ea7 Mon Sep 17 00:00:00 2001 From: Martin Rudalics Date: Sat, 24 Mar 2007 09:43:07 +0000 Subject: [PATCH] (Man-support-local-filenames): Assure that default-directory exists when doing call-process. --- lisp/man.el | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lisp/man.el b/lisp/man.el index a6aced25e3d..0484c032e34 100644 --- a/lisp/man.el +++ b/lisp/man.el @@ -628,7 +628,14 @@ a new value." (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 -- 2.11.4.GIT