# HG changeset patch # User Chong Yidong # Date 1269805915 14400 # Node ID 41aaf2a768948f14ccf2c94208005453a7e7c589 # Parent 04698fd447b3c9744d6ec7b6b6bcda512a4951dc Fix for `compile' (Bug#5771). * progmodes/compile.el (compilation-start): Fix regexp detection of initial cd command (Bug#5771). diff -r 04698fd447b3 -r 41aaf2a76894 lisp/ChangeLog --- a/lisp/ChangeLog Sun Mar 28 15:31:27 2010 -0400 +++ b/lisp/ChangeLog Sun Mar 28 15:51:55 2010 -0400 @@ -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 -r 04698fd447b3 -r 41aaf2a76894 lisp/progmodes/compile.el --- a/lisp/progmodes/compile.el Sun Mar 28 15:31:27 2010 -0400 +++ b/lisp/progmodes/compile.el Sun Mar 28 15:51:55 2010 -0400 @@ -1220,7 +1220,8 @@ ;; 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)) "~")