]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix for `compile' (Bug#5771).
authorChong Yidong <cyd@stupidchicken.com>
Sun, 28 Mar 2010 19:51:55 +0000 (15:51 -0400)
committerChong Yidong <cyd@stupidchicken.com>
Sun, 28 Mar 2010 19:51:55 +0000 (15:51 -0400)
* progmodes/compile.el (compilation-start): Fix regexp detection
of initial cd command (Bug#5771).

lisp/ChangeLog
lisp/progmodes/compile.el

index 6098c2fc3a1f8f4946ac9b712d6de437c276ffb0..25dd9c352280b4677555d4becf3475fb88b283ce 100644 (file)
@@ -1,3 +1,8 @@
+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).
index 20fe89937bca7e79cbd82843d4a3fb0a3aa8269e..51e42809153ea7f0564d23491be4c08a32f64bd5 100644 (file)
@@ -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))
                  "~")