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:
'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-systemthe variables below named
sicstus-something will not be used, in some cases corresponding functionality is available through variables named
'(3 . 8). Note that the spaces are significant!
t(the default) to enable the source-linked debugging extensions by default. The debugging can be enabled via the
Prologmenu even if this variable is
nil. Note that the source-linked debugging only works if
sicstus-versionis set correctly.
'(("call" . ">>>") ("exit" . "+++") ("ndexit" . "?++") ("redo" . "<<<") ("fail" . "---") ("exception" . "==>"))
ndexit is the nondeterminate variant of the Exit
port. Do not rely on this variable. It will change in future
tab-width, normally 8.
p :- ( q1 ; q2, q3 ).
Note that the spaces between the parentheses and the code are
automatically inserted when <TAB> is pressed at those positions.
nilto prevent single
%-comments from being automatically aligned. Defaults to
Note that comments with one
% are indented to comment-column, comments
% to the code level, and that comments with three
never changed when indenting.
nilto prevent indentation of text inside
/* ... */comments. Defaults
}of an object definition to
prolog-indent-width. Defaults to
:-keyword). Defaults to
'((sicstus ("block" "discontiguous" "dynamic" "initialization" "meta_predicate" "mode" "module" "multifile" "public" "volatile")))
nilto prevent Emacs from automatically indenting the next line when pressing <RET>. Defaults to
tto enable deletion of all white space before the cursor when pressing <DEL> (unless inside a comment, string, or quoted atom). Defaults to
tto 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
tto 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
tto enable the key-bindings of the old Emacs interface. These bindings are not used by default since they violate GNU Emacs recommendations. Defaults to
nilto 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
'beg-of-clause. The first is faster but may result in erroneous indentation in
/* ... */comments. The default is
tto enable a new
Predicatemenu 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
Prolog/Help on predicatemenu entry). The default setting is
nilto not make underscore (_) a word-constituent character. Defaults to