comparison lisp/progmodes/compile.el @ 13819:57cd7ef01dc7

(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.
author Richard M. Stallman <rms@gnu.org>
date Sat, 23 Dec 1995 07:13:31 +0000
parents 5f7ea59f14b6
children 6d4e18531dd2
comparison
equal deleted inserted replaced
13818:0d1de22afac0 13819:57cd7ef01dc7
434 (set-marker (process-mark proc) (point) outbuf) 434 (set-marker (process-mark proc) (point) outbuf)
435 (setq compilation-in-progress 435 (setq compilation-in-progress
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
446 ;; Set the height of WINDOW according to compilation-window-height. 470 ;; Set the height of WINDOW according to compilation-window-height.
447 (defun compilation-set-window-height (window) 471 (defun compilation-set-window-height (window)