diff options
author | Richard M. Stallman <[email protected]> | 1995-12-23 07:13:31 +0000 |
---|---|---|
committer | Richard M. Stallman <[email protected]> | 1995-12-23 07:13:31 +0000 |
commit | d3e568911541fcb1c10a4cbe26c875e30197cb7d (patch) | |
tree | 163a29a67ec7837b288a0a7c6b685d85ddb1b976 /lisp/progmodes | |
parent | b5e10b2357dc19760d6f34e9909f189e5ef34205 (diff) |
(compile-internal): On systems with no asynchronous
processes: do relevant parts of compilation-sentinel after the
process exits; make modeline during and after compilation be
similar to what compilation-sentinel displays.
Diffstat (limited to 'lisp/progmodes')
-rw-r--r-- | lisp/progmodes/compile.el | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index b093158dce..b4db10e308 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -436,10 +436,34 @@ Returns the compilation buffer created." (cons proc compilation-in-progress))) ;; No asynchronous processes available (message (format "Executing `%s'..." command)) + ;; Fake modeline display as if `start-process' were run. + (setq mode-line-process ":run") (sit-for 0) ;; Force redisplay (let ((status (call-process shell-file-name nil outbuf nil "-c" - command)))) - (message (format "Executing `%s'...done" command))))) + command)) + finish-msg) + ;; Fake modeline after exit. + (setq mode-line-process + (cond ((numberp status) (format ":exit[%d]" status)) + ((stringp status) (format ":exit[-1: %s]" status)) + (t ":exit[???]"))) + ;; Call `compilation-finish-function' as `compilation-sentinel' + ;; would, and finish up the compilation buffer with the same + ;; message we would get from `start-process'. + (setq finish-msg + (if (numberp status) + (if (zerop status) + "finished\n" + (format "exited abnormally with code %d\n" status)) + "exited abnormally with code -1\n")) + (goto-char (point-max)) + (insert "\nCompilation " finish-msg) + (forward-char -1) + (insert " at " (substring (current-time-string) 0 19)) ; no year + (forward-char 1) + (if compilation-finish-function + (funcall compilation-finish-function outbuf finish-msg))) + (message (format "Executing `%s'...done" command))))) ;; Make it so the next C-x ` will use this buffer. (setq compilation-last-buffer outbuf))) |