aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2000-03-08 23:46:09 +0000
committerStefan Monnier2000-03-08 23:46:09 +0000
commit433d16a1961e32b95c0299650f4222765415bbb4 (patch)
treeb9f6eb06b4bc086670869dfd46a8d880fbb41449
parent95cd4c403d8dd85f8371bc92bca328cd690b84d5 (diff)
downloademacs-433d16a1961e32b95c0299650f4222765415bbb4.tar.gz
emacs-433d16a1961e32b95c0299650f4222765415bbb4.zip
(comint-exec-1): Add the current-dir to the exec-path when
the command has a directory component (such as "./testml"). Also fix a typo in the comment.
-rw-r--r--lisp/comint.el9
1 files changed, 6 insertions, 3 deletions
diff --git a/lisp/comint.el b/lisp/comint.el
index d0b40e90913..7084d77bd21 100644
--- a/lisp/comint.el
+++ b/lisp/comint.el
@@ -124,7 +124,6 @@
124;; comint-save-input-ring-index number ... 124;; comint-save-input-ring-index number ...
125;; comint-input-autoexpand symbol ... 125;; comint-input-autoexpand symbol ...
126;; comint-input-ignoredups boolean ... 126;; comint-input-ignoredups boolean ...
127;; comint-last-input-match string ...
128;; comint-dynamic-complete-functions hook For the completion mechanism 127;; comint-dynamic-complete-functions hook For the completion mechanism
129;; comint-completion-fignore list ... 128;; comint-completion-fignore list ...
130;; comint-file-name-chars string ... 129;; comint-file-name-chars string ...
@@ -692,12 +691,16 @@ buffer. The hook `comint-exec-hook' is run after each exec."
692 default-directory 691 default-directory
693 (char-to-string directory-sep-char))) 692 (char-to-string directory-sep-char)))
694 proc decoding encoding changed) 693 proc decoding encoding changed)
695 (setq proc (apply 'start-process name buffer command switches)) 694 (let ((exec-path (if (file-name-directory command)
695 ;; If the command has slashes, make sure we
696 ;; first look relative to the current directory.
697 (cons default-directory exec-path) exec-path)))
698 (setq proc (apply 'start-process name buffer command switches)))
696 (let ((coding-systems (process-coding-system proc))) 699 (let ((coding-systems (process-coding-system proc)))
697 (setq decoding (car coding-systems) 700 (setq decoding (car coding-systems)
698 encoding (cdr coding-systems))) 701 encoding (cdr coding-systems)))
699 ;; If start-process decided to use some coding system for decoding 702 ;; If start-process decided to use some coding system for decoding
700 ;; data sent form the process and the coding system doesn't 703 ;; data sent from the process and the coding system doesn't
701 ;; specify EOL conversion, we had better convert CRLF to LF. 704 ;; specify EOL conversion, we had better convert CRLF to LF.
702 (if (vectorp (coding-system-eol-type decoding)) 705 (if (vectorp (coding-system-eol-type decoding))
703 (setq decoding (coding-system-change-eol-conversion decoding 'dos) 706 (setq decoding (coding-system-change-eol-conversion decoding 'dos)