To try it, you need the following programs installed:
- Scryer Prolog
dot
(from Graphviz)convert
(from ImageMagick)
Copy showterm.el
and 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: