Sweep provides a way to read SWI-Prolog documentation via the standard
Emacs help
user interface, akin to Emacs’s built-in
describe-function
(C-h f) and describe-variable
(C-h v). For more information about Emacs help
and its
special major mode, help-mode
, (emacs)Help Mode.
Prompt for a Prolog module and display its full documentation in a help buffer.
Prompt for a Prolog predicate and display its full documentation in a help buffer.
The command sweeprolog-describe-module
prompts for the name of
a Prolog module and displays its documentation in the *Help*
buffer. To jump to the source code from the documentation, press
s (help-view-source
).
Similarly, you can use M-x sweeprolog-describe-predicate RET to display the documentation of a Prolog predicate. This commands prompts for a predicate with completion. When the cursor is over a predicate definition or invocation in a Sweep Prolog mode, that predicate is set as the default selection and can be described by simply typing RET in response to the prompt.