]> git.eshelyaron.com Git - emacs.git/commitdiff
Nikolaj Schumacher <n_schumacher at web.de> (tiny change)
authorGlenn Morris <rgm@gnu.org>
Wed, 23 May 2007 08:12:59 +0000 (08:12 +0000)
committerGlenn Morris <rgm@gnu.org>
Wed, 23 May 2007 08:12:59 +0000 (08:12 +0000)
(compilation-handle-exit): `compilation-finish-function' may change
the current buffer.

lisp/ChangeLog
lisp/progmodes/compile.el

index a0d024b2109c828218973e0f9168aafbc7e8204c..3ecd84c2a98e93f55d7d9921800707e97dbf1ea9 100644 (file)
@@ -1,3 +1,8 @@
+2007-05-23  Nikolaj Schumacher  <n_schumacher@web.de>  (tiny change)
+
+       * progmodes/compile.el (compilation-handle-exit):
+       `compilation-finish-function' may change the current buffer.
+
 2007-05-22  Jan Dj\e,Ad\e(Brv  <jan.h.d@swipnet.se>
 
        * help-fns.el (find-source-lisp-file): New function.
index a3107339c2bc626e72ff55a90985a4dbc12097b8..7701809463d74520caa3bf9078adf2060e376061 100644 (file)
@@ -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)