The behavior of the Emacs interface can be controlled by a set of user-configurable settings. Some of these can be changed on the fly, while some require Emacs to be restarted. To set a variable on the fly, type M-x set-variable <RET> VariableName <RET> Value <RET>. Note that variable names can be completed by typing a few characters and then pressing <TAB>.
To set a variable so that the setting is used every time Emacs is started, add lines of the following format to ~/.emacs:
(setq VariableName Value)
Note that the Emacs interface is presently not using the `Customize' functionality to edit the settings.
The available settings are:
prolog-system
'sicstus
, which will be assumed for the rest of this
chapter. See the on-line documentation for the meaning of other
settings. For other settings of prolog-system
the variables below
named sicstus-
something will not be used, in some cases
corresponding functionality is available through variables named
prolog-
something.
sicstus-version
'(3 . 8)
.
Note that the spaces are significant!
prolog-use-sicstus-sd
t
(the default) to enable the source-linked debugging
extensions by default. The debugging can be enabled via the
Prolog
menu even if this variable is nil
. Note that the
source-linked debugging only works if sicstus-version
is
set correctly.
pltrace-port-arrow-assoc
obsolescent'(("call" . ">>>") ("exit" . "+++") ("ndexit" . "?++") ("redo" . "<<<") ("fail" . "---") ("exception" . "==>"))
where ndexit
is the nondeterminate variant of the Exit
port. Do not rely on this variable. It will change in future
releases.
prolog-indent-width
tab-width
, normally 8.
prolog-paren-indent
p :- ( q1 ; q2, q3 ).
Note that the spaces between the parentheses and the code are
automatically inserted when <TAB> is pressed at those positions.
prolog-align-comments-flag
nil
to prevent single %
-comments from being automatically
aligned. Defaults to t
.
Note that comments with one %
are indented to comment-column, comments
with two %
to the code level, and that comments with three %
are
never changed when indenting.
prolog-indent-mline-comments-flag
nil
to prevent indentation of text inside /*
... */
comments. Defaults t
.
prolog-object-end-to-0-flag
}
of an object definition to
prolog-indent-width
. Defaults to t
.
sicstus-keywords
:-
keyword). Defaults to
'((sicstus ("block" "discontiguous" "dynamic" "initialization" "meta_predicate" "mode" "module" "multifile" "public" "volatile")))
prolog-electric-newline-flag
nil
to prevent Emacs from automatically indenting the next
line when pressing <RET>. Defaults to t
.
prolog-hungry-delete-key-flag
t
to enable deletion of all white space before the
cursor when pressing <DEL> (unless inside a comment, string,
or quoted atom). Defaults to nil
.
prolog-electric-dot-flag
t
to enable the electric dot function. If enabled,
pressing . at the end of a non-empty line inserts a dot and a
newline. When pressed at the beginning of a line, a new head of
the last predicate is inserted. When pressed at the end of a line
with only whitespace, a recursive call to the current predicate is
inserted. The function respects the arity of the predicate
and inserts parentheses and the correct number of commas for separation
of the arguments. Defaults to nil
.
prolog-electric-underscore-flag
t
to enable the electric underscore function. When
enabled, pressing underscore (_) when the cursor is on a
variable, replaces the variable with the anynomous variable. Defaults to
nil
.
prolog-old-sicstus-keys-flag
t
to enable the key-bindings of the old Emacs interface. These
bindings are not used by default since they violate GNU Emacs
recommendations. Defaults to nil
.
prolog-use-prolog-tokenizer-flag
nil
to use built-in functions of Emacs for parsing the
source code when indenting. This is faster than the default but
does not handle some of the syntax peculiarities of
Prolog. Defaults to t
.
prolog-parse-mode
'beg-of-line
and 'beg-of-clause
. The first is
faster but may result in erroneous indentation in /* ... */
comments. The default is 'beg-of-line
.
prolog-imenu-flag
t
to enable a new Predicate
menu that contains all
predicates of the current file. Choosing an entry in the menu
moves the cursor to the start of that predicate. Defaults to
nil
.
prolog-info-predicate-index
Prolog/Help on predicate
menu entry). The default
setting is "(sicstus)Predicate Index"
.
prolog-underscore-wordchar-flag
nil
to not make underscore (_) a word-constituent
character. Defaults to t
.