help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: encoding in *compilation-buffer*


From: Peter Dyballa
Subject: Re: encoding in *compilation-buffer*
Date: Sun, 20 Feb 2011 15:14:41 +0100


Am 20.02.2011 um 13:58 schrieb tlanglois:

Well, once more I have to confess my ignorance... How can I do that ?
Is there a before-compilation-hook that I can customize ?


It's much simpler! This variable exists in GNU Emacs:

        compile-command is a variable defined in `compile.el'.
        Its value is "time nice +11 make -k bootstrap"
        Original value was "make -k "
        
This variable is potentially risky when used as a file local variable.
          This variable is safe as a file local variable if its value
satisfies the predicate `(lambda (a) (and (stringp a) (or (not (boundp (quote compilation-read-command))) compilation-read-command)))'.
        
        Documentation:
Last shell command used to do a compilation; default for next compilation.
        
Sometimes it is useful for files to supply local values for this variable. You might also use mode hooks to specify it in certain modes, like this:
        
            (add-hook 'c-mode-hook
               (lambda ()
                 (unless (or (file-exists-p "makefile")
                             (file-exists-p "Makefile"))
                   (set (make-local-variable 'compile-command)
                        (concat "make -k "
                                (file-name-sans-extension buffer-file-name))))))
        
        You can customize this variable.

I have it already customised, as you can see. To reach it you can use the Options menu with the sub-menu Customize Emacs or look up the documentation of compile-command per

        C-h v compile-command RET

and then click at the /customize/ hyper-link.

--
Greetings

  Pete

Only useless documentation transcends the first two laws.
                                – Arnold's Third Law of Documentation




reply via email to

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