changeset 102072:1867fcb8720e

(compilation-filter): Call `comint-carriage-motion', just like `comint-output-filter'.
author Sam Steingold <sds@gnu.org>
date Tue, 17 Feb 2009 16:49:40 +0000
parents e25fb73b6868
children a03d06977060
files lisp/ChangeLog lisp/progmodes/compile.el
diffstat 2 files changed, 10 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Tue Feb 17 14:58:15 2009 +0000
+++ b/lisp/ChangeLog	Tue Feb 17 16:49:40 2009 +0000
@@ -1,3 +1,8 @@
+2009-02-17  Sam Steingold  <sds@gnu.org>
+
+	* progmodes/compile.el (compilation-filter): Call
+	`comint-carriage-motion', just like `comint-output-filter'.
+
 2009-02-17  Juanma Barranquero  <lekktu@gmail.com>
 
 	* net/newst-treeview.el (newsticker--treeview-load): Remove bogus `if'.
--- a/lisp/progmodes/compile.el	Tue Feb 17 14:58:15 2009 +0000
+++ b/lisp/progmodes/compile.el	Tue Feb 17 16:49:40 2009 +0000
@@ -1726,7 +1726,9 @@
 
 (defun compilation-filter (proc string)
   "Process filter for compilation buffers.
-Just inserts the text, and runs `compilation-filter-hook'."
+Just inserts the text,
+handles carriage motion (see `comint-inhibit-carriage-motion'),
+and runs `compilation-filter-hook'."
   (when (buffer-live-p (process-buffer proc))
     (with-current-buffer (process-buffer proc)
       (let ((inhibit-read-only t)
@@ -1739,6 +1741,8 @@
               ;; point at `process-mark' scroll along with the output, but we
               ;; now use window-point-insertion-type instead.
               (insert string)
+              (unless comint-inhibit-carriage-motion
+                (comint-carriage-motion (process-mark proc) (point)))
               (set-marker (process-mark proc) (point))
               (run-hooks 'compilation-filter-hook))
           (goto-char pos))))))