emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] trunk r114502: * lisp/progmodes/compile.el (compilation-st


From: Stefan Monnier
Subject: [Emacs-diffs] trunk r114502: * lisp/progmodes/compile.el (compilation-start): Try globbing the arg to `cd'.
Date: Wed, 02 Oct 2013 23:33:56 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 114502
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=15417
author: Kevin Rodgers <address@hidden>
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Wed 2013-10-02 19:33:48 -0400
message:
  * lisp/progmodes/compile.el (compilation-start): Try globbing the arg to `cd'.
modified:
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/progmodes/compile.el      compile.el-20091113204419-o5vbwnq5f7feedwu-126
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2013-10-02 13:48:20 +0000
+++ b/lisp/ChangeLog    2013-10-02 23:33:48 +0000
@@ -1,3 +1,8 @@
+2013-10-02  Kevin Rodgers  <address@hidden>
+
+       * progmodes/compile.el (compilation-start): Try globbing the arg to
+       `cd' (bug#15417).
+
 2013-10-02  Michael Albinus  <address@hidden>
 
        Sync with Tramp 2.2.8.

=== modified file 'lisp/progmodes/compile.el'
--- a/lisp/progmodes/compile.el 2013-08-13 07:56:43 +0000
+++ b/lisp/progmodes/compile.el 2013-10-02 23:33:48 +0000
@@ -1583,7 +1583,16 @@
                "\\\\\\(.\\)" "\\1"
                (substring command (1+ (match-beginning 1))
                           (1- (match-end 1)))))
-             (t (substitute-env-vars (match-string 1 command)))))
+             ;; Try globbing as well (bug#15417).
+             (t (let* ((substituted-dir
+                        (substitute-env-vars (match-string 1 command)))
+                       ;; FIXME: This also tries to expand `*' that were
+                       ;; introduced by the envvar expansion!
+                       (expanded-dir
+                        (file-expand-wildcards substituted-dir)))
+                  (if (= (length expanded-dir) 1)
+                      (car expanded-dir)
+                    substituted-dir)))))
        (erase-buffer)
        ;; Select the desired mode.
        (if (not (eq mode t))


reply via email to

[Prev in Thread] Current Thread [Next in Thread]