From: Richard M. Stallman Date: Tue, 14 Nov 1995 03:48:33 +0000 (+0000) Subject: (compilation-sentinel): Use the local value of X-Git-Tag: emacs-19.34~2320 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=256e4874e9886e34ba7ebdad769a866d3a6fd3b8;p=emacs.git (compilation-sentinel): Use the local value of compilation-exit-message-function in the process buffer. --- diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index 92149e4ac8d..172a4622791 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -566,11 +566,7 @@ See `compilation-mode'." ;; buffer killed (set-process-buffer proc nil) (let ((obuf (current-buffer)) - omax opoint - (status (if compilation-exit-message-function - (funcall compilation-exit-message-function - proc msg) - (cons msg (process-exit-status proc))))) + omax opoint) ;; save-excursion isn't the right thing if ;; process-buffer is current-buffer (unwind-protect @@ -578,7 +574,11 @@ See `compilation-mode'." ;; Write something in the compilation buffer ;; and hack its mode line. (set-buffer buffer) - (let ((buffer-read-only nil)) + (let ((buffer-read-only nil) + (status (if compilation-exit-message-function + (funcall compilation-exit-message-function + proc msg) + (cons msg (process-exit-status proc))))) (setq omax (point-max) opoint (point)) (goto-char omax)