From: Kevin Rodgers Date: Wed, 2 Oct 2013 23:33:48 +0000 (-0400) Subject: * lisp/progmodes/compile.el (compilation-start): Try globbing the arg to `cd'. X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~1408 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=376f862a32805cdce7121a2800c2317d5614d750;p=emacs.git * lisp/progmodes/compile.el (compilation-start): Try globbing the arg to `cd'. Fixes: debbugs:15417 --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 14d6f8503f6..e1aab1a78bf 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2013-10-02 Kevin Rodgers + + * progmodes/compile.el (compilation-start): Try globbing the arg to + `cd' (bug#15417). + 2013-10-02 Michael Albinus Sync with Tramp 2.2.8. diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index 8c981b36e56..e25be05fb09 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -1583,7 +1583,16 @@ Returns the compilation buffer created." "\\\\\\(.\\)" "\\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))