# HG changeset patch # User Richard M. Stallman # Date 841609410 0 # Node ID 18414e324084f0c5e5971967049444c7445103b9 # Parent 737a86ba36d7a445c030936baef3979a1336394e (compilation-finish-functions): New variable. (compilation-handle-exit): Run compilation-finish-functions. diff -r 737a86ba36d7 -r 18414e324084 lisp/progmodes/compile.el --- a/lisp/progmodes/compile.el Sun Sep 01 19:52:14 1996 +0000 +++ b/lisp/progmodes/compile.el Sun Sep 01 20:23:30 1996 +0000 @@ -80,6 +80,12 @@ It is called with two arguments: the compilation buffer, and a string describing how the process finished.") +;;;###autoload +(defvar compilation-finish-functions nil + "*Functions to call when a compilation process finishes. +Each function is called with two arguments: the compilation buffer, +and a string describing how the process finished.") + (defvar compilation-last-buffer nil "The most recent compilation buffer. A buffer becomes most recent when its compilation is started @@ -613,7 +619,11 @@ (if (and opoint (< opoint omax)) (goto-char opoint)) (if compilation-finish-function - (funcall compilation-finish-function (current-buffer) msg)))) + (funcall compilation-finish-function (current-buffer) msg)) + (let ((functions compilation-finish-functions)) + (while functions + (funcall (car functions) (current-buffer) msg) + (setq functions (cdr functions)))))) ;; Called when compilation process changes state. (defun compilation-sentinel (proc msg)