Emacs Tcl Mode
- Tcl Mode is automatically selected if you visit a file ending in .tcl;
you can force Tcl Mode with M-x tcl-mode
- Defun and S expression commands customized for Tcl
- Parenthesis matching for Tcl brackets
- TAB indents line for Tcl code
- C-M-q indents an entire Tcl group (like a proc)
Using An Inferior Tcl
An inferior Tcl is Emacs jargon for a Tcl interpreter
that's running inside an Emacs buffer.
Invoke an inferior Tcl with
M-x inferior-tcl
or with C-c C-p from Tcl Mode.
Most Emacs commands can be used to move around in this buffer. Some
commands have special behavior: e.g., C-a and
DEL understand the prompt.
History:
M-p and M-n recall the previous and next line,
respectively, from the command line history.
Re-editing Previous Command Lines
You can also move directly to a previous command line, re-edit in
place (or not) and then execute it by hitting RET. The
command is automatically re-executed at the end of the buffer.
Searching for Previous Command Lines
You can use ordinary searching commands (like C-r and
C-s), but you can also use the specialized commands
M-r and M-s.
Loading Tcl Files
Of course you can load a Tcl source file into the inferior with the
Tcl source
command, but you can also use C-c
C-l, which does completion on the filename in the minibuffer.
Signals
You can send Unix signals to the inferior:
- C-c C-c
- Sends a SIGINT (same as type C-c from the Unix shell)
- C-c C-\e
- Sends a SIGQUIT (same as type C-\e from the Unix shell)
C-c C-c is the thing to type if your Tcl code is looping
infinitely, for example. C-c C-\e is more extreme, and
causes a core dump. Alterntively, you can kill the inferior.
Exiting or Killing the Inferior
You can exit the inferior by giving the Tcl exit
command,
or by sending end-of-file (EOF) to Tcl with a C-d as the
first thing on the command line. You will see the message:
Process inferior-tcl finished
indicating that the Tcl interpretor has been killed.
Alternatively, you can simply kill the Emacs buffer associated with
the inferior Tcl (with C-x k); this is a perfectly valid
way to exit the Tcl interpreter.
Finally, Emacs will kill the running inferior when you exit Emacs. It
will first ask you if that's okay:
Active processes exist; kill them and exit anyway (yes or no)
You should answer yes if you want to exit.
Keith Waclena
The University of Chicago Library
This page last updated: Mon Jul 25 14:14:13 CDT 1994
This page was generated from Extended HTML by xhtml.