Mercurial > emacs
comparison lisp/progmodes/compile.el @ 16042:18414e324084
(compilation-finish-functions): New variable.
(compilation-handle-exit): Run compilation-finish-functions.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sun, 01 Sep 1996 20:23:30 +0000 |
parents | 01518892abad |
children | 39556b6d7c6e |
comparison
equal
deleted
inserted
replaced
16041:737a86ba36d7 | 16042:18414e324084 |
---|---|
77 ;;;###autoload | 77 ;;;###autoload |
78 (defvar compilation-finish-function nil | 78 (defvar compilation-finish-function nil |
79 "*Function to call when a compilation process finishes. | 79 "*Function to call when a compilation process finishes. |
80 It is called with two arguments: the compilation buffer, and a string | 80 It is called with two arguments: the compilation buffer, and a string |
81 describing how the process finished.") | 81 describing how the process finished.") |
82 | |
83 ;;;###autoload | |
84 (defvar compilation-finish-functions nil | |
85 "*Functions to call when a compilation process finishes. | |
86 Each function is called with two arguments: the compilation buffer, | |
87 and a string describing how the process finished.") | |
82 | 88 |
83 (defvar compilation-last-buffer nil | 89 (defvar compilation-last-buffer nil |
84 "The most recent compilation buffer. | 90 "The most recent compilation buffer. |
85 A buffer becomes most recent when its compilation is started | 91 A buffer becomes most recent when its compilation is started |
86 or when it is used with \\[next-error] or \\[compile-goto-error].") | 92 or when it is used with \\[next-error] or \\[compile-goto-error].") |
611 ;; Force mode line redisplay soon. | 617 ;; Force mode line redisplay soon. |
612 (force-mode-line-update) | 618 (force-mode-line-update) |
613 (if (and opoint (< opoint omax)) | 619 (if (and opoint (< opoint omax)) |
614 (goto-char opoint)) | 620 (goto-char opoint)) |
615 (if compilation-finish-function | 621 (if compilation-finish-function |
616 (funcall compilation-finish-function (current-buffer) msg)))) | 622 (funcall compilation-finish-function (current-buffer) msg)) |
623 (let ((functions compilation-finish-functions)) | |
624 (while functions | |
625 (funcall (car functions) (current-buffer) msg) | |
626 (setq functions (cdr functions)))))) | |
617 | 627 |
618 ;; Called when compilation process changes state. | 628 ;; Called when compilation process changes state. |
619 (defun compilation-sentinel (proc msg) | 629 (defun compilation-sentinel (proc msg) |
620 "Sentinel for compilation buffers." | 630 "Sentinel for compilation buffers." |
621 (let ((buffer (process-buffer proc))) | 631 (let ((buffer (process-buffer proc))) |