comparison lisp/progmodes/tcl.el @ 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 52b7a8c22af5
children a9dc0e7c3f2b
comparison
equal deleted inserted replaced
99775:042c1d530bbd 99776:46cd7381c2ff
1027 ;; work as well as I'd like it to. But I don't believe there is 1027 ;; work as well as I'd like it to. But I don't believe there is
1028 ;; anything useful that can be done. 1028 ;; anything useful that can be done.
1029 (defvar inferior-tcl-delete-prompt-marker nil) 1029 (defvar inferior-tcl-delete-prompt-marker nil)
1030 1030
1031 (defun tcl-filter (proc string) 1031 (defun tcl-filter (proc string)
1032 (let ((inhibit-quit t)) 1032 (let ((inhibit-quit t)) ;FIXME: Isn't that redundant?
1033 (with-current-buffer (process-buffer proc) 1033 (with-current-buffer (process-buffer proc)
1034 (goto-char (process-mark proc))
1035 ;; Delete prompt if requested. 1034 ;; Delete prompt if requested.
1036 (if (marker-buffer inferior-tcl-delete-prompt-marker) 1035 (when (marker-buffer inferior-tcl-delete-prompt-marker)
1037 (progn 1036 (delete-region (process-mark proc) inferior-tcl-delete-prompt-marker)
1038 (delete-region (point) inferior-tcl-delete-prompt-marker) 1037 (set-marker inferior-tcl-delete-prompt-marker nil))))
1039 (set-marker inferior-tcl-delete-prompt-marker nil)))))
1040 (comint-output-filter proc string)) 1038 (comint-output-filter proc string))
1041 1039
1042 (defun tcl-send-string (proc string) 1040 (defun tcl-send-string (proc string)
1043 (with-current-buffer (process-buffer proc) 1041 (with-current-buffer (process-buffer proc)
1044 (goto-char (process-mark proc)) 1042 (goto-char (process-mark proc))