emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs/lisp ChangeLog progmodes/compile.el


From: Richard M. Stallman
Subject: [Emacs-diffs] emacs/lisp ChangeLog progmodes/compile.el
Date: Mon, 18 May 2009 16:31:03 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Changes by:     Richard M. Stallman <rms>       09/05/18 16:31:02

Modified files:
        lisp           : ChangeLog 
        lisp/progmodes : compile.el 

Log message:
        * progmodes/compile.el (compilation-filter): If inserting at end
        of accessible part of buffer, keep end of output visible.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/ChangeLog?cvsroot=emacs&r1=1.15643&r2=1.15644
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/progmodes/compile.el?cvsroot=emacs&r1=1.492&r2=1.493

Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/ChangeLog,v
retrieving revision 1.15643
retrieving revision 1.15644
diff -u -b -r1.15643 -r1.15644
--- ChangeLog   18 May 2009 16:26:57 -0000      1.15643
+++ ChangeLog   18 May 2009 16:30:59 -0000      1.15644
@@ -1,5 +1,8 @@
 2009-05-18  Richard M Stallman  <address@hidden>
 
+       * progmodes/compile.el (compilation-filter): If inserting at end
+       of accessible part of buffer, keep end of output visible.
+
        * mail/rmail.el (rmail-expunge-confirmed): Return nil if nothing to do.
        Don't call rmail-modify-format here.
        (rmail-expunge): Call it here after expunge is confirmed.

Index: progmodes/compile.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/progmodes/compile.el,v
retrieving revision 1.492
retrieving revision 1.493
diff -u -b -r1.492 -r1.493
--- progmodes/compile.el        4 Mar 2009 14:33:45 -0000       1.492
+++ progmodes/compile.el        18 May 2009 16:31:02 -0000      1.493
@@ -1739,9 +1739,15 @@
     (with-current-buffer (process-buffer proc)
       (let ((inhibit-read-only t)
             ;; `save-excursion' doesn't use the right insertion-type for us.
-            (pos (copy-marker (point) t)))
+            (pos (copy-marker (point) t))
+           (min (point-min-marker))
+           (max (point-max-marker)))
         (unwind-protect
             (progn
+             ;; If we are inserting at the end of the accessible part
+             ;; of the buffer, keep the inserted text visible.
+             (set-marker-insertion-type max t)
+             (widen)
               (goto-char (process-mark proc))
               ;; We used to use `insert-before-markers', so that windows with
               ;; point at `process-mark' scroll along with the output, but we
@@ -1751,7 +1757,10 @@
                 (comint-carriage-motion (process-mark proc) (point)))
               (set-marker (process-mark proc) (point))
               (run-hooks 'compilation-filter-hook))
-          (goto-char pos))))))
+         (goto-char pos)
+          (narrow-to-region min max)
+         (set-marker min nil)
+         (set-marker max nil))))))
 
 ;;; test if a buffer is a compilation buffer, assuming we're in the buffer
 (defsubst compilation-buffer-internal-p ()




reply via email to

[Prev in Thread] Current Thread [Next in Thread]