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: Juri Linkov
Subject: Re: compile.el: save compile-command
Date: Fri, 23 Apr 2010 11:37:37 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (x86_64-pc-linux-gnu)

> 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.
>
>       (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")

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?

Then the first line doesn't become longer, and the compile command
still is clearly visible where it currently is.

-- 
Juri Linkov
http://www.jurta.org/emacs/




reply via email to

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