changeset 76691:9522301cee68

(Man-support-local-filenames): Assure that default-directory exists when doing call-process.
author Martin Rudalics <rudalics@gmx.at>
date Sat, 24 Mar 2007 09:43:07 +0000
parents 79a8b64c8235
children 9af0d9e91c22
files lisp/man.el
diffstat 1 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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