emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/emacs-24 r107978: Fix a gdb-mi process filt


From: Chong Yidong
Subject: [Emacs-diffs] /srv/bzr/emacs/emacs-24 r107978: Fix a gdb-mi process filtering issue arising in ansi-color.el.
Date: Mon, 07 May 2012 11:14:21 +0800
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 107978
committer: Chong Yidong <address@hidden>
branch nick: emacs-24
timestamp: Mon 2012-05-07 11:14:21 +0800
message:
  Fix a gdb-mi process filtering issue arising in ansi-color.el.
  
  * 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.
modified:
  lisp/ChangeLog
  lisp/ansi-color.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2012-05-06 17:57:28 +0000
+++ b/lisp/ChangeLog    2012-05-07 03:14:21 +0000
@@ -1,3 +1,9 @@
+2012-05-07  Chong Yidong  <address@hidden>
+
+       * 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  <address@hidden>
 
        * files.el (dir-locals-read-from-file):

=== modified file 'lisp/ansi-color.el'
--- a/lisp/ansi-color.el        2012-02-19 13:59:42 +0000
+++ b/lisp/ansi-color.el        2012-05-07 03:14:21 +0000
@@ -217,8 +217,12 @@
 `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)


reply via email to

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