emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] emacs-24 r117090: * compile.el (recompile): Handle C-u M-x


From: Glenn Morris
Subject: [Emacs-diffs] emacs-24 r117090: * compile.el (recompile): Handle C-u M-x recompile from non-compilation buffer
Date: Fri, 09 May 2014 06:42:49 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 117090
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/17444
committer: Glenn Morris <address@hidden>
branch nick: emacs-24
timestamp: Thu 2014-05-08 23:42:39 -0700
message:
  * compile.el (recompile): Handle C-u M-x recompile from non-compilation buffer
modified:
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/progmodes/compile.el      compile.el-20091113204419-o5vbwnq5f7feedwu-126
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2014-05-08 19:22:43 +0000
+++ b/lisp/ChangeLog    2014-05-09 06:42:39 +0000
@@ -1,3 +1,8 @@
+2014-05-09  Glenn Morris  <address@hidden>
+
+       * progmodes/compile.el (recompile):
+       Handle C-u M-x recompile from a non-compilation buffer.  (Bug#17444)
+
 2014-05-08  Juri Linkov  <address@hidden>
 
        * dired.el (dired-check-switches, dired-switches-recursive-p):

=== modified file 'lisp/progmodes/compile.el'
--- a/lisp/progmodes/compile.el 2014-02-10 01:34:22 +0000
+++ b/lisp/progmodes/compile.el 2014-05-09 06:42:39 +0000
@@ -1430,7 +1430,7 @@
 `compilation-shell-minor-mode'.
 
 Interactively, prompts for the command if the variable
-`compilation-read-command' is non-nil; otherwise uses`compile-command'.
+`compilation-read-command' is non-nil; otherwise uses `compile-command'.
 With prefix arg, always prompts.
 Additionally, with universal prefix arg, compilation buffer will be in
 comint mode, i.e. interactive.
@@ -1469,12 +1469,13 @@
   (interactive "P")
   (save-some-buffers (not compilation-ask-about-save)
                      compilation-save-buffers-predicate)
-  (let ((default-directory (or compilation-directory default-directory)))
+  (let ((default-directory (or compilation-directory default-directory))
+       (command (eval compile-command)))
     (when edit-command
-      (setcar compilation-arguments
-              (compilation-read-command (car compilation-arguments))))
-    (apply 'compilation-start (or compilation-arguments
-                                 `(,(eval compile-command))))))
+      (setq command (compilation-read-command (or (car compilation-arguments)
+                                                 command)))
+      (if compilation-arguments (setcar compilation-arguments command)))
+    (apply 'compilation-start (or compilation-arguments (list command)))))
 
 (defcustom compilation-scroll-output nil
   "Non-nil to scroll the *compilation* buffer window as output appears.


reply via email to

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