]> git.eshelyaron.com Git - emacs.git/commitdiff
(compilation-sentinel): Use the local value of
authorRichard M. Stallman <rms@gnu.org>
Tue, 14 Nov 1995 03:48:33 +0000 (03:48 +0000)
committerRichard M. Stallman <rms@gnu.org>
Tue, 14 Nov 1995 03:48:33 +0000 (03:48 +0000)
compilation-exit-message-function in the process buffer.

lisp/progmodes/compile.el

index 92149e4ac8d75c290176763e46ac2a8b1955db3b..172a4622791eca491217cc9555e84316fe129da6 100644 (file)
@@ -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)