;;; 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>
;; 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))))
;; 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))))
(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)