summaryrefslogtreecommitdiff
path: root/lisp/comint.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1994-11-09 20:54:45 +0000
committerRichard M. Stallman <rms@gnu.org>1994-11-09 20:54:45 +0000
commit436642ad9a345f20b2016fd8ec147150b707957a (patch)
tree8f79bbf84523a34f45e1881f7c3b98e076686b68 /lisp/comint.el
parentfaddee5561dcf80b2fb37b65585b5879db2e6b9b (diff)
downloademacs-436642ad9a345f20b2016fd8ec147150b707957a.tar.gz
(comint-exec-1): Make sure default-directory is a real dir.
Diffstat (limited to 'lisp/comint.el')
-rw-r--r--lisp/comint.el6
1 files changed, 5 insertions, 1 deletions
diff --git a/lisp/comint.el b/lisp/comint.el
index 3c5a3db8595..ff8c07960df 100644
--- a/lisp/comint.el
+++ b/lisp/comint.el
@@ -580,7 +580,11 @@ buffer. The hook `comint-exec-hook' is run after each exec."
(format "COLUMNS=%d" (frame-width)))
(list "EMACS=t" "TERM=emacs"
(format "TERMCAP=emacs:co#%d:tc=unknown" (frame-width))))
- process-environment)))
+ process-environment))
+ (default-directory
+ (if (file-directory-p default-directory)
+ default-directory
+ "/")))
(apply 'start-process name buffer command switches)))
;;; Input history processing in a buffer