* compilation-start-hook
@ 2008-11-17 16:14 Sam Steingold
0 siblings, 0 replies; only message in thread
From: Sam Steingold @ 2008-11-17 16:14 UTC (permalink / raw
To: Emacs Devel
I use "omake -P" which monitors files and automatically recompiles when they
change, i.e., the process in the compilation buffer never exits.
However, I do not want to be asked about a running process when I do C-x C-c,
so I thought of adding compilation-start-hook:
--- compile.el.~1.481.~ 2008-11-17 10:09:59.000000000 -0500
+++ compile.el 2008-11-17 11:04:27.000926000 -0500
@@ -92,6 +92,17 @@ (defcustom compilation-mode-hook nil
:group 'compilation)
;;;###autoload
+(defcustom compilation-start-hook nil
+ "List of hook functions run by `compilation-start' on the compilation process.
+\(See `run-hook-with-args').
+If you use \"omake -P\" and do not want \\[save-buffers-kill-terminal] to ask
whether you want
+the compilation to be killed, you can use this hook:
+ (add-hook 'compilation-start-hook
+ (lambda (process) (set-process-query-on-exit-flag process nil)) nil t)"
+ :type 'hook
+ :group 'compilation)
+
+;;;###autoload
(defcustom compilation-window-height nil
"Number of lines in a compilation window. If nil, use Emacs default."
:type '(choice (const :tag "Default" nil)
@@ -1277,6 +1288,7 @@ Returns the compilation buffer created."
(process-send-eof proc)
;; The process may have exited already.
(error nil)))
+ (run-hook-with-args 'compilation-start-hook proc)
(setq compilation-in-progress
(cons proc compilation-in-progress)))
;; No asynchronous processes available.
any objections?
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-11-17 16:14 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-17 16:14 compilation-start-hook Sam Steingold
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.