diff options
author | Chong Yidong <cyd@stupidchicken.com> | 2011-05-09 15:42:45 -0400 |
---|---|---|
committer | Chong Yidong <cyd@stupidchicken.com> | 2011-05-09 15:42:45 -0400 |
commit | 9bedd73a50921360823210bcc791d1ba1861be70 (patch) | |
tree | 046e459662864230c7cda1605c5f4cda226aaf33 /lisp/progmodes/compile.el | |
parent | 68b5d5ee5404f47d3038c7e3af141e6013f2e491 (diff) | |
download | emacs-9bedd73a50921360823210bcc791d1ba1861be70.tar.gz |
Call compilation-filter-hook in the no-async case too.
* progmodes/compile.el (compilation-start): Run
compilation-filter-hook for the async case too.
(compilation-filter-hook): Doc fix.
Diffstat (limited to 'lisp/progmodes/compile.el')
-rw-r--r-- | lisp/progmodes/compile.el | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index 60ad7cb0e9e..b8cac2fd331 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -68,7 +68,10 @@ the compilation to be killed, you can use this hook: "Hook run after `compilation-filter' has inserted a string into the buffer. It is called with the variable `compilation-filter-start' bound to the position of the start of the inserted text, and point at -its end.") +its end. + +If Emacs lacks asynchronous process support, this hook is run +after `call-process' inserts the grep output into the buffer.") (defvar compilation-filter-start nil "Start of the text inserted by `compilation-filter'. @@ -1629,8 +1632,10 @@ Returns the compilation buffer created." ;; regardless of where the user sees point. (goto-char (point-max)) (let* ((inhibit-read-only t) ; call-process needs to modify outbuf + (compilation-filter-start (point)) (status (call-process shell-file-name nil outbuf nil "-c" command))) + (run-hooks 'compilation-filter-hook) (cond ((numberp status) (compilation-handle-exit 'exit status |