]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix a gdb-mi process filtering issue arising in ansi-color.el.
authorChong Yidong <cyd@gnu.org>
Mon, 7 May 2012 03:14:21 +0000 (11:14 +0800)
committerChong Yidong <cyd@gnu.org>
Mon, 7 May 2012 03:14:21 +0000 (11:14 +0800)
* lisp/ansi-color.el (ansi-color-process-output): Check for validity
of comint-last-output-start before using it.  This avoids a bad
interaction with gdb-mi's input/output buffer.

lisp/ChangeLog
lisp/ansi-color.el

index f559acb2ecc13daf1ff9d0301871eb772ad1afda..c6a430491b373c386c675fb06cebf5532ed04e2c 100644 (file)
@@ -1,3 +1,9 @@
+2012-05-07  Chong Yidong  <cyd@gnu.org>
+
+       * ansi-color.el (ansi-color-process-output): Check for validity of
+       comint-last-output-start before using it.  This avoids a bad
+       interaction with gdb-mi's input/output buffer.
+
 2012-05-06  Glenn Morris  <rgm@gnu.org>
 
        * files.el (dir-locals-read-from-file):
index 15a543e959194eba935402fb11c123b131612cf1..6a82f17667663e3437a65b53546b9c2a173d3f83 100644 (file)
@@ -217,8 +217,12 @@ The comint output is assumed to lie between the marker
 `comint-last-output-start' and the process-mark.
 
 This is a good function to put in `comint-output-filter-functions'."
-  (let ((start-marker (or comint-last-output-start
-                         (point-min-marker)))
+  (let ((start-marker (if (and (markerp comint-last-output-start)
+                              (eq (marker-buffer comint-last-output-start)
+                                  (current-buffer))
+                              (marker-position comint-last-output-start))
+                         comint-last-output-start
+                       (point-min-marker)))
        (end-marker (process-mark (get-buffer-process (current-buffer)))))
     (cond ((eq ansi-color-for-comint-mode nil))
          ((eq ansi-color-for-comint-mode 'filter)