aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Tromey1994-08-22 15:56:24 +0000
committerTom Tromey1994-08-22 15:56:24 +0000
commit700a20bf498cf7a9e46170d46e8126e8c969359a (patch)
tree43b79ec852e6efd60974b81c99c5671973bef961
parent3530a31713d26f6ed951bb2780e9f08683971374 (diff)
downloademacs-700a20bf498cf7a9e46170d46e8126e8c969359a.tar.gz
emacs-700a20bf498cf7a9e46170d46e8126e8c969359a.zip
tcl-load-file default to current buffer.
-rw-r--r--lisp/progmodes/tcl.el17
1 files changed, 11 insertions, 6 deletions
diff --git a/lisp/progmodes/tcl.el b/lisp/progmodes/tcl.el
index 5d89312b0f8..68db6d09c0a 100644
--- a/lisp/progmodes/tcl.el
+++ b/lisp/progmodes/tcl.el
@@ -6,7 +6,7 @@
6;; Author: Tom Tromey <tromey@busco.lanl.gov> 6;; Author: Tom Tromey <tromey@busco.lanl.gov>
7;; Chris Lindblad <cjl@lcs.mit.edu> 7;; Chris Lindblad <cjl@lcs.mit.edu>
8;; Keywords: languages tcl modes 8;; Keywords: languages tcl modes
9;; Version: $Revision: 1.23 $ 9;; Version: $Revision: 1.24 $
10 10
11;; This file is part of GNU Emacs. 11;; This file is part of GNU Emacs.
12 12
@@ -51,7 +51,7 @@
51;; LCD Archive Entry: 51;; LCD Archive Entry:
52;; tcl|Tom Tromey|tromey@busco.lanl.gov| 52;; tcl|Tom Tromey|tromey@busco.lanl.gov|
53;; Major mode for editing Tcl| 53;; Major mode for editing Tcl|
54;; $Date: 1994/08/21 03:54:45 $|$Revision: 1.23 $|~/modes/tcl.el.Z| 54;; $Date: 1994/08/21 20:33:05 $|$Revision: 1.24 $|~/modes/tcl.el.Z|
55 55
56;; CUSTOMIZATION NOTES: 56;; CUSTOMIZATION NOTES:
57;; * tcl-proc-list can be used to customize a list of things that 57;; * tcl-proc-list can be used to customize a list of things that
@@ -65,6 +65,9 @@
65 65
66;; Change log: 66;; Change log:
67;; $Log: tcl.el,v $ 67;; $Log: tcl.el,v $
68;; Revision 1.24 1994/08/21 20:33:05 tromey
69;; Fixed bug in tcl-guess-application.
70;;
68;; Revision 1.23 1994/08/21 03:54:45 tromey 71;; Revision 1.23 1994/08/21 03:54:45 tromey
69;; Keybindings don't overshadown comint bindings. 72;; Keybindings don't overshadown comint bindings.
70;; 73;;
@@ -270,7 +273,7 @@
270 (require 'imenu)) 273 (require 'imenu))
271 ())) 274 ()))
272 275
273(defconst tcl-version "$Revision: 1.23 $") 276(defconst tcl-version "$Revision: 1.24 $")
274(defconst tcl-maintainer "Tom Tromey <tromey@busco.lanl.gov>") 277(defconst tcl-maintainer "Tom Tromey <tromey@busco.lanl.gov>")
275 278
276;; 279;;
@@ -1724,7 +1727,11 @@ Prefix argument means switch to the Tcl buffer afterwards."
1724 (list 1727 (list
1725 ;; car because comint-get-source returns a list holding the 1728 ;; car because comint-get-source returns a list holding the
1726 ;; filename. 1729 ;; filename.
1727 (car (comint-get-source "Load Tcl file: " tcl-previous-dir/file 1730 (car (comint-get-source "Load Tcl file: "
1731 (or (and
1732 (eq major-mode 'tcl-mode)
1733 (buffer-file-name))
1734 tcl-previous-dir/file)
1728 '(tcl-mode) t)) 1735 '(tcl-mode) t))
1729 current-prefix-arg)) 1736 current-prefix-arg))
1730 (comint-check-source file) 1737 (comint-check-source file)
@@ -1734,8 +1741,6 @@ Prefix argument means switch to the Tcl buffer afterwards."
1734 (format inferior-tcl-source-command (tcl-quote file))) 1741 (format inferior-tcl-source-command (tcl-quote file)))
1735 (if and-go (switch-to-tcl t))) 1742 (if and-go (switch-to-tcl t)))
1736 1743
1737;; Maybe this should work just like tcl-load-file. But I think what
1738;; I've implemented will turn out to be more useful.
1739(defun tcl-restart-with-file (file &optional and-go) 1744(defun tcl-restart-with-file (file &optional and-go)
1740 "Restart inferior Tcl with file. 1745 "Restart inferior Tcl with file.
1741If an inferior Tcl process exists, it is killed first. 1746If an inferior Tcl process exists, it is killed first.