From c96e025abb1ba6924c6d53776636284113c942d1 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Wed, 23 May 2007 08:12:59 +0000 Subject: [PATCH] Nikolaj Schumacher (tiny change) (compilation-handle-exit): `compilation-finish-function' may change the current buffer. --- lisp/ChangeLog | 5 +++++ lisp/progmodes/compile.el | 7 ++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a0d024b2109..3ecd84c2a98 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2007-05-23 Nikolaj Schumacher (tiny change) + + * progmodes/compile.el (compilation-handle-exit): + `compilation-finish-function' may change the current buffer. + 2007-05-22 Jan Dj,Ad(Brv * help-fns.el (find-source-lisp-file): New function. diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index a3107339c2b..7701809463d 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -1426,7 +1426,8 @@ Turning the mode on runs the normal hook `compilation-minor-mode-hook'." process-status exit-status msg) (cons msg exit-status))) (omax (point-max)) - (opoint (point))) + (opoint (point)) + (cur-buffer (current-buffer))) ;; Record where we put the message, so we can ignore it later on. (goto-char omax) (insert ?\n mode-name " " (car status)) @@ -1447,8 +1448,8 @@ Turning the mode on runs the normal hook `compilation-minor-mode-hook'." (goto-char opoint)) (with-no-warnings (if compilation-finish-function - (funcall compilation-finish-function (current-buffer) msg))) - (run-hook-with-args 'compilation-finish-functions (current-buffer) msg))) + (funcall compilation-finish-function cur-buffer msg))) + (run-hook-with-args 'compilation-finish-functions cur-buffer msg))) ;; Called when compilation process changes state. (defun compilation-sentinel (proc msg) -- 2.39.2