aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1995-12-23 07:13:31 +0000
committerRichard M. Stallman1995-12-23 07:13:31 +0000
commitd3e568911541fcb1c10a4cbe26c875e30197cb7d (patch)
tree163a29a67ec7837b288a0a7c6b685d85ddb1b976
parentb5e10b2357dc19760d6f34e9909f189e5ef34205 (diff)
downloademacs-d3e568911541fcb1c10a4cbe26c875e30197cb7d.tar.gz
emacs-d3e568911541fcb1c10a4cbe26c875e30197cb7d.zip
(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.
-rw-r--r--lisp/progmodes/compile.el28
1 files changed, 26 insertions, 2 deletions
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index b093158dcea..b4db10e3082 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -436,10 +436,34 @@ Returns the compilation buffer created."
436 (cons proc compilation-in-progress))) 436 (cons proc compilation-in-progress)))
437 ;; No asynchronous processes available 437 ;; No asynchronous processes available
438 (message (format "Executing `%s'..." command)) 438 (message (format "Executing `%s'..." command))
439 ;; Fake modeline display as if `start-process' were run.
440 (setq mode-line-process ":run")
439 (sit-for 0) ;; Force redisplay 441 (sit-for 0) ;; Force redisplay
440 (let ((status (call-process shell-file-name nil outbuf nil "-c" 442 (let ((status (call-process shell-file-name nil outbuf nil "-c"
441 command)))) 443 command))
442 (message (format "Executing `%s'...done" command))))) 444 finish-msg)
445 ;; Fake modeline after exit.
446 (setq mode-line-process
447 (cond ((numberp status) (format ":exit[%d]" status))
448 ((stringp status) (format ":exit[-1: %s]" status))
449 (t ":exit[???]")))
450 ;; Call `compilation-finish-function' as `compilation-sentinel'
451 ;; would, and finish up the compilation buffer with the same
452 ;; message we would get from `start-process'.
453 (setq finish-msg
454 (if (numberp status)
455 (if (zerop status)
456 "finished\n"
457 (format "exited abnormally with code %d\n" status))
458 "exited abnormally with code -1\n"))
459 (goto-char (point-max))
460 (insert "\nCompilation " finish-msg)
461 (forward-char -1)
462 (insert " at " (substring (current-time-string) 0 19)) ; no year
463 (forward-char 1)
464 (if compilation-finish-function
465 (funcall compilation-finish-function outbuf finish-msg)))
466 (message (format "Executing `%s'...done" command)))))
443 ;; Make it so the next C-x ` will use this buffer. 467 ;; Make it so the next C-x ` will use this buffer.
444 (setq compilation-last-buffer outbuf))) 468 (setq compilation-last-buffer outbuf)))
445 469