ADDED: showterm.el and showterm.pl to draw terms as trees in Emacs

This commit is contained in:
Markus Triska
2020-10-03 09:52:46 +02:00
parent ed7a4514de
commit 35a3f2dc91
4 changed files with 272 additions and 0 deletions

31
tools/README.md Normal file
View File

@@ -0,0 +1,31 @@
# Showterm: Draw Prolog terms as trees in Emacs
To try it, you need the following programs installed:
- [**Scryer Prolog**](https://github.com/mthom/scryer-prolog)
- `dot` (from Graphviz)
- `convert` (from ImageMagick)
Copy [`showterm.el`](showterm.el) and [`showterm.pl`](showterm.pl) to
the same directory, say `~/scryer-prolog/tools/`, and add to your
`.emacs`:
(load "~/scryer-prolog/tools/showterm.el")
If necessary, set `scryer-prolog-path` to the Scryer Prolog
executable by adding to your `.emacs` (adapting as appropriate):
(setq scryer-prolog-path "/usr/local/bin/scryer-prolog")
The function `showterm` draws the Prolog term in the region as
a tree. You can invoke it with `M-x showterm RET`, or for example
by binding it to a key in your `.emacs`, and then pressing
that key:
(global-set-key [f12] 'showterm)
Enjoy!
**Screenshot:**
![Showterm example](showterm.png)