Commit f6f8aa12 authored by Chong Yidong's avatar Chong Yidong
Browse files

Fix for `compile' (Bug#5771).

* progmodes/compile.el (compilation-start): Fix regexp detection
of initial cd command (Bug#5771).
parent 7ed287b5
2010-03-28 Chong Yidong <cyd@stupidchicken.com>
* progmodes/compile.el (compilation-start): Fix regexp detection
of initial cd command (Bug#5771).
2010-03-28 Stefan Guath <stefan@automata.se> (tiny change)
* find-dired.el (find-dired): Use read-directory-name (Bug#5777).
......
......@@ -1220,7 +1220,8 @@ Returns the compilation buffer created."
;; Then evaluate a cd command if any, but don't perform it yet, else
;; start-command would do it again through the shell: (cd "..") AND
;; sh -c "cd ..; make"
(cd (if (string-match "^\\s *cd\\(?:\\s +\\(\\S +?\\)\\)?\\s *[;&\n]" command)
(cd (if (string-match "\\`\\s *cd\\(?:\\s +\\(\\S +?\\)\\)?\\s *[;&\n]"
command)
(if (match-end 1)
(substitute-env-vars (match-string 1 command))
"~")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment