diff options
| author | Glenn Morris | 2007-05-23 08:09:37 +0000 |
|---|---|---|
| committer | Glenn Morris | 2007-05-23 08:09:37 +0000 |
| commit | bd40f902ad693c8de5bccb556e8d44287b9c7215 (patch) | |
| tree | 5e5fe9ef4a39eca806e448e89e16e83de73381f0 | |
| parent | 1083cfb10e3e1474f4ea54b537816412ae677d14 (diff) | |
| download | emacs-bd40f902ad693c8de5bccb556e8d44287b9c7215.tar.gz emacs-bd40f902ad693c8de5bccb556e8d44287b9c7215.zip | |
Nikolaj Schumacher <n_schumacher at web.de> (tiny change)
(compilation-handle-exit): `compilation-finish-function' may change
the current buffer.
| -rw-r--r-- | lisp/progmodes/compile.el | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index d3e8ec85d05..9a630ace9aa 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'." | |||
| 1426 | process-status exit-status msg) | 1426 | process-status exit-status msg) |
| 1427 | (cons msg exit-status))) | 1427 | (cons msg exit-status))) |
| 1428 | (omax (point-max)) | 1428 | (omax (point-max)) |
| 1429 | (opoint (point))) | 1429 | (opoint (point)) |
| 1430 | (cur-buffer (current-buffer))) | ||
| 1430 | ;; Record where we put the message, so we can ignore it later on. | 1431 | ;; Record where we put the message, so we can ignore it later on. |
| 1431 | (goto-char omax) | 1432 | (goto-char omax) |
| 1432 | (insert ?\n mode-name " " (car status)) | 1433 | (insert ?\n mode-name " " (car status)) |
| @@ -1447,8 +1448,8 @@ Turning the mode on runs the normal hook `compilation-minor-mode-hook'." | |||
| 1447 | (goto-char opoint)) | 1448 | (goto-char opoint)) |
| 1448 | (with-no-warnings | 1449 | (with-no-warnings |
| 1449 | (if compilation-finish-function | 1450 | (if compilation-finish-function |
| 1450 | (funcall compilation-finish-function (current-buffer) msg))) | 1451 | (funcall compilation-finish-function cur-buffer msg))) |
| 1451 | (run-hook-with-args 'compilation-finish-functions (current-buffer) msg))) | 1452 | (run-hook-with-args 'compilation-finish-functions cur-buffer msg))) |
| 1452 | 1453 | ||
| 1453 | ;; Called when compilation process changes state. | 1454 | ;; Called when compilation process changes state. |
| 1454 | (defun compilation-sentinel (proc msg) | 1455 | (defun compilation-sentinel (proc msg) |