An Emacs Minor Mode
An open source (MIT-0), GNU Emacs, minor mode for Tcl/Tk.
The Tcl Digraphs Minor Mode makes it easier to edit Tcl by mapping some two-stroke key combinations to frequently used notation. Although Tcl has a simple syntax (the Dodekalogue) and a small number of special characters, that syntax and those characters often involve multiple, sometimes shifted, keystrokes. Shortcuts are faster.
The Emacs describe-minor-mode
function lists the twenty-plus digraphs.
Installation and Use
- copy
tcl-digraphs.el
into a directory on the Emacsload-path
- add
(require 'tcl-digraphs)
to yourinit.el
- add
(add-hook 'tcl-mode-hook 'tcl-digraph-minor-mode)
M-x tcl-digraph-minor-mode
as needed
Customization
tcl-digraph-prefix
customizes the first character of a digraph.
By default it is the semicolon (;
), which is convenient on typical U.S. keyboards, but other language layouts have better choices, e.g., hyphen (‑
) on the US Dvorak-, asterisk (*
) on the French-, number-sign (#
) on the German-, dollar-sign ($
) on the Swiss-, or masculine-ordinal-indicator (º
) on the Portuguese- layout.
Bibliography
- EuroTcl2019: Tcl Digraphs, Emacs Tcl Minor Mode, Michael Kaelbling, EuroTcl2019, Munich, Germany, June 2019. Video ca. 7 min. Version 3.4, Slides
- Code by Voice a tangential topic. Voice-coding also uses shortcuts, and this might be a fruitful area for co-operative work.
Acknowledgments
- Matthias Saft – for comments on the interface and presentation.
- Peter Spjuth – for suggestions on Emacs integration.