emacs-devel
[Top][All Lists]
Advanced

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

compile.el: save compile-command


From: Alfred M. Szmidt
Subject: compile.el: save compile-command
Date: Thu, 22 Apr 2010 10:57:04 -0400

This patch stores the compile command in a variable, so that it can be
reused for M-x compile or M-x recompile.

2010-04-22  Alfred M. Szmidt  <address@hidden>

        * progmodes/compile.el (compilation-start): Save COMMAND in
        file local variable.

diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index 13cf862..5a1371e 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -1266,11 +1266,11 @@ Returns the compilation buffer created."
        ;; Output a mode setter, for saving and later reloading this buffer.
        (insert "-*- mode: " name-of-mode
                "; default-directory: " (prin1-to-string default-directory)
+               "; compile-command: " (prin1-to-string command)
                " -*-\n"
-               (format "%s started at %s\n\n"
+               (format "%s started at %s\n"
                        mode-name
-                       (substring (current-time-string) 0 19))
-               command "\n")
+                       (substring (current-time-string) 0 19)) "\n")
        (setq thisdir default-directory))
       (set-buffer-modified-p nil))
     ;; Pop up the compilation buffer.




reply via email to

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