From: Chong Yidong Date: Sun, 28 Mar 2010 19:51:55 +0000 (-0400) Subject: Fix for `compile' (Bug#5771). X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~438^2~646 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f6f8aa125110ed71a4601c661facfe9150322f0a;p=emacs.git Fix for `compile' (Bug#5771). * progmodes/compile.el (compilation-start): Fix regexp detection of initial cd command (Bug#5771). --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6098c2fc3a1..25dd9c35228 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2010-03-28 Chong Yidong + + * progmodes/compile.el (compilation-start): Fix regexp detection + of initial cd command (Bug#5771). + 2010-03-28 Stefan Guath (tiny change) * find-dired.el (find-dired): Use read-directory-name (Bug#5777). diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index 20fe89937bc..51e42809153 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -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)) "~")