emacs-devel
[Top][All Lists]
Advanced

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

Re: compile.el: save compile-command


From: Alfred M. Szmidt
Subject: Re: compile.el: save compile-command
Date: Fri, 23 Apr 2010 10:31:54 -0400

   The idea is good, but the output is very ugly: the first line becomes
   too long, and the compile command is no more easy to find and read.

   Since your intention was to save the command as a file local variable,
   what do you think about putting an `invisible' property over the added
   `compile-command' in the first line?

The property would be lost if you save the compilation output, and use
it at a later point.  I don't see the problem with long lines, since
all lines are long when compiling anyway.  How about the following
instead.

2010-04-23  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..5a8ef69 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -1266,6 +1266,7 @@ 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"
                        mode-name




reply via email to

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