diff options
| author | Richard M. Stallman | 2009-05-18 16:30:59 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2009-05-18 16:30:59 +0000 |
| commit | 0b508a27360a82763d4d7256b4cd526f9d3514aa (patch) | |
| tree | 4faea83b23d4a9e100bcf8f7ad17d19f33c30d06 | |
| parent | 4df49ff1d29649952368f633c4f1f6016429b1e6 (diff) | |
| download | emacs-0b508a27360a82763d4d7256b4cd526f9d3514aa.tar.gz emacs-0b508a27360a82763d4d7256b4cd526f9d3514aa.zip | |
* progmodes/compile.el (compilation-filter): If inserting at end
of accessible part of buffer, keep end of output visible.
| -rw-r--r-- | lisp/ChangeLog | 3 | ||||
| -rw-r--r-- | lisp/progmodes/compile.el | 13 |
2 files changed, 14 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b1241123942..cfc11bd2e40 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,8 @@ | |||
| 1 | 2009-05-18 Richard M Stallman <rms@gnu.org> | 1 | 2009-05-18 Richard M Stallman <rms@gnu.org> |
| 2 | 2 | ||
| 3 | * progmodes/compile.el (compilation-filter): If inserting at end | ||
| 4 | of accessible part of buffer, keep end of output visible. | ||
| 5 | |||
| 3 | * mail/rmail.el (rmail-expunge-confirmed): Return nil if nothing to do. | 6 | * mail/rmail.el (rmail-expunge-confirmed): Return nil if nothing to do. |
| 4 | Don't call rmail-modify-format here. | 7 | Don't call rmail-modify-format here. |
| 5 | (rmail-expunge): Call it here after expunge is confirmed. | 8 | (rmail-expunge): Call it here after expunge is confirmed. |
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index 2b3b954a412..283a37acd8c 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el | |||
| @@ -1739,9 +1739,15 @@ and runs `compilation-filter-hook'." | |||
| 1739 | (with-current-buffer (process-buffer proc) | 1739 | (with-current-buffer (process-buffer proc) |
| 1740 | (let ((inhibit-read-only t) | 1740 | (let ((inhibit-read-only t) |
| 1741 | ;; `save-excursion' doesn't use the right insertion-type for us. | 1741 | ;; `save-excursion' doesn't use the right insertion-type for us. |
| 1742 | (pos (copy-marker (point) t))) | 1742 | (pos (copy-marker (point) t)) |
| 1743 | (min (point-min-marker)) | ||
| 1744 | (max (point-max-marker))) | ||
| 1743 | (unwind-protect | 1745 | (unwind-protect |
| 1744 | (progn | 1746 | (progn |
| 1747 | ;; If we are inserting at the end of the accessible part | ||
| 1748 | ;; of the buffer, keep the inserted text visible. | ||
| 1749 | (set-marker-insertion-type max t) | ||
| 1750 | (widen) | ||
| 1745 | (goto-char (process-mark proc)) | 1751 | (goto-char (process-mark proc)) |
| 1746 | ;; We used to use `insert-before-markers', so that windows with | 1752 | ;; We used to use `insert-before-markers', so that windows with |
| 1747 | ;; point at `process-mark' scroll along with the output, but we | 1753 | ;; point at `process-mark' scroll along with the output, but we |
| @@ -1751,7 +1757,10 @@ and runs `compilation-filter-hook'." | |||
| 1751 | (comint-carriage-motion (process-mark proc) (point))) | 1757 | (comint-carriage-motion (process-mark proc) (point))) |
| 1752 | (set-marker (process-mark proc) (point)) | 1758 | (set-marker (process-mark proc) (point)) |
| 1753 | (run-hooks 'compilation-filter-hook)) | 1759 | (run-hooks 'compilation-filter-hook)) |
| 1754 | (goto-char pos)))))) | 1760 | (goto-char pos) |
| 1761 | (narrow-to-region min max) | ||
| 1762 | (set-marker min nil) | ||
| 1763 | (set-marker max nil)))))) | ||
| 1755 | 1764 | ||
| 1756 | ;;; test if a buffer is a compilation buffer, assuming we're in the buffer | 1765 | ;;; test if a buffer is a compilation buffer, assuming we're in the buffer |
| 1757 | (defsubst compilation-buffer-internal-p () | 1766 | (defsubst compilation-buffer-internal-p () |