]> code.delx.au - gnu-emacs/blobdiff - lisp/progmodes/tcl.el
(gdb-gud-context-call): Does not need to be a macro.
[gnu-emacs] / lisp / progmodes / tcl.el
index f0c4950616159a045f014ac80ce3421a6c97f171..8760df78ddf95a2c07f90fe0552bdedbbb2bb2e3 100644 (file)
@@ -1,7 +1,7 @@
 ;;; tcl.el --- Tcl code editing commands for Emacs
 
-;; Copyright (C) 1994, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
-;;           Free Software Foundation, Inc.
+;; Copyright (C) 1994, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+;;   2006, 2007, 2008, 2009  Free Software Foundation, Inc.
 
 ;; Maintainer: FSF
 ;; Author: Tom Tromey <tromey@redhat.com>
@@ -634,7 +634,7 @@ Commands:
   ;; Indent line first; this looks better if parens blink.
   (tcl-indent-line)
   (self-insert-command arg)
-  (if (and tcl-auto-newline (= last-command-char ?\;))
+  (if (and tcl-auto-newline (= last-command-event ?\;))
       (progn
        (newline)
        (tcl-indent-line))))
@@ -658,7 +658,7 @@ Commands:
        ;; In auto-newline case, must insert a newline after each
        ;; brace.  So an explicit loop is needed.
        (while (> arg 0)
-         (insert last-command-char)
+         (insert last-command-event)
          (tcl-indent-line)
          (newline)
          (setq arg (1- arg))))
@@ -1029,14 +1029,12 @@ Returns nil if line starts inside a string, t if in a comment."
 (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)