# HG changeset patch # User Jesper Harder # Date 1095874263 0 # Node ID 03a731220a3347f55411c41e4196522c3d6be489 # Parent c9052d4625415d69e429b54c90b11439941f3fdd * progmodes/tcl.el (inferior-tcl): Use pop-to-buffer. diff -r c9052d462541 -r 03a731220a33 lisp/ChangeLog --- a/lisp/ChangeLog Wed Sep 22 02:28:21 2004 +0000 +++ b/lisp/ChangeLog Wed Sep 22 17:31:03 2004 +0000 @@ -1,3 +1,7 @@ +2004-09-20 Jesper Harder + + * progmodes/tcl.el (inferior-tcl): Use pop-to-buffer. + 2004-09-21 Luc Teirlinck * subr.el (after-change-major-mode-hook): Doc fix. diff -r c9052d462541 -r 03a731220a33 lisp/progmodes/tcl.el --- a/lisp/progmodes/tcl.el Wed Sep 22 02:28:21 2004 +0000 +++ b/lisp/progmodes/tcl.el Wed Sep 22 17:31:03 2004 +0000 @@ -1,6 +1,6 @@ ;;; 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 @@ -1104,15 +1104,13 @@ (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)