Mercurial > emacs
comparison lisp/progmodes/compile.el @ 77786:a4a6ec16f923
Nikolaj Schumacher <n_schumacher at web.de> (tiny change)
(compilation-handle-exit): `compilation-finish-function' may change
the current buffer.
author | Glenn Morris <rgm@gnu.org> |
---|---|
date | Wed, 23 May 2007 08:09:37 +0000 |
parents | b34ac8963d00 |
children | c90e5f7ef586 |
comparison
equal
deleted
inserted
replaced
77785:d02b9dab9f0e | 77786:a4a6ec16f923 |
---|---|
1424 (status (if compilation-exit-message-function | 1424 (status (if compilation-exit-message-function |
1425 (funcall compilation-exit-message-function | 1425 (funcall compilation-exit-message-function |
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)) |
1433 (if (and (numberp compilation-window-height) | 1434 (if (and (numberp compilation-window-height) |
1434 (zerop compilation-window-height)) | 1435 (zerop compilation-window-height)) |
1445 (force-mode-line-update) | 1446 (force-mode-line-update) |
1446 (if (and opoint (< opoint omax)) | 1447 (if (and opoint (< opoint omax)) |
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) |
1455 "Sentinel for compilation buffers." | 1456 "Sentinel for compilation buffers." |
1456 (if (memq (process-status proc) '(exit signal)) | 1457 (if (memq (process-status proc) '(exit signal)) |