;;; tcl.el --- Tcl code editing commands for Emacs
-;; Copyright (C) 1994,98,1999,2000,01,02,2003 Free Software Foundation, Inc.
+;; Copyright (C) 1994,98,1999,2000,01,02,2003,2004 Free Software Foundation, Inc.
;; Maintainer: FSF
;; Author: Tom Tromey <tromey@redhat.com>
;; Chris Lindblad <cjl@lcs.mit.edu>
;; Keywords: languages tcl modes
-;; Version: $Revision: 1.75 $
;; This file is part of GNU Emacs.
;; proc foo { \n {arg1 def} \n arg2 } {
;; The current setting handles the first case properly but not the second.
;; It also fails if `proc' is not in column-0 (e.g. it's in a namespace).
-(defconst tcl-omit-ws-regexp "^[^] \t\n#}].+[ \t]+")
+(defconst tcl-omit-ws-regexp "^[^]\" \t\n#}][^\n\"#]+[ \t]+")
\f
(list (if current-prefix-arg
(read-string "Run Tcl: " tcl-application)
tcl-application)))
- (if (not (comint-check-proc "*inferior-tcl*"))
- (progn
- (set-buffer (apply (function make-comint) "inferior-tcl" cmd nil
- tcl-command-switches))
- (inferior-tcl-mode)))
- (make-local-variable 'tcl-application)
- (setq tcl-application cmd)
+ (unless (comint-check-proc "*inferior-tcl*")
+ (set-buffer (apply (function make-comint) "inferior-tcl" cmd nil
+ tcl-command-switches))
+ (inferior-tcl-mode))
+ (set (make-local-variable 'tcl-application) cmd)
(setq inferior-tcl-buffer "*inferior-tcl*")
- (switch-to-buffer "*inferior-tcl*"))
+ (pop-to-buffer "*inferior-tcl*"))
(defalias 'run-tcl 'inferior-tcl)