changeset 99776:46cd7381c2ff

(tcl-filter): Don't forcibly move point.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Fri, 21 Nov 2008 22:17:42 +0000
parents 042c1d530bbd
children b1be79c8e945
files lisp/ChangeLog lisp/progmodes/tcl.el
diffstat 2 files changed, 8 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Fri Nov 21 20:40:08 2008 +0000
+++ b/lisp/ChangeLog	Fri Nov 21 22:17:42 2008 +0000
@@ -1,3 +1,7 @@
+2008-11-21  Ivan Shmakov  <oneingray@gmail.com>  (tiny change)
+
+	* progmodes/tcl.el (tcl-filter): Don't forcibly move point.
+
 2008-11-21  Stefan Monnier  <monnier@iro.umontreal.ca>
 
 	* international/quail.el (quail-indent-to): New function.
--- a/lisp/progmodes/tcl.el	Fri Nov 21 20:40:08 2008 +0000
+++ b/lisp/progmodes/tcl.el	Fri Nov 21 22:17:42 2008 +0000
@@ -1029,14 +1029,12 @@
 (defvar inferior-tcl-delete-prompt-marker nil)
 
 (defun tcl-filter (proc string)
-  (let ((inhibit-quit t))
+  (let ((inhibit-quit t))               ;FIXME: Isn't that redundant?
     (with-current-buffer (process-buffer proc)
-      (goto-char (process-mark proc))
       ;; Delete prompt if requested.
-      (if (marker-buffer inferior-tcl-delete-prompt-marker)
-	  (progn
-	    (delete-region (point) inferior-tcl-delete-prompt-marker)
-	    (set-marker inferior-tcl-delete-prompt-marker nil)))))
+      (when (marker-buffer inferior-tcl-delete-prompt-marker)
+        (delete-region (process-mark proc) inferior-tcl-delete-prompt-marker)
+        (set-marker inferior-tcl-delete-prompt-marker nil))))
   (comint-output-filter proc string))
 
 (defun tcl-send-string (proc string)