Skip to content

Files

Latest commit

c84a5c3 · Jun 29, 2023

History

History
This branch is 479 commits behind mthom/scryer-prolog:master.

tools

Showterm: Draw Prolog terms as trees in Emacs

To try it, you need the following programs installed:

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:

Showterm example