This module implements the generic editor interface. It consists of two
extensible parts with little in between. The first part deals with
translating the input into source-location, and the second with starting
an editor.
edit(+Spec)- Edit indicated object.
edit- Edit associated or script file. This is the Prolog file opened
by double-clicking or the file loaded using
% swipl [-s] file.pl
locations(+Spec, -Locations) is det- Locate entities matching Spec. Locations is a list of pairs
Location-FullSpec, where Location is a dict holding a file,
optional line and optional linepos keys. FullSpec is the
disambiguated specification, e.g., member expands to member/2
for the predicate.
locate(+Spec, -FullSpec, -Location:dict)[multifile]
locate(+Spec, -Location)[multifile]- Locate object from the specified location.
predicate_location(:Predicate, -Location) is nondet- Find the source location of a predicate.
- Arguments:
-
| Predicate | - is a qualified head. The module may be unbound at
entry. It will be bound to the actual implementation module. |
addr2location(+Address, -File, -Line) is semidet- Get the File and Line for a C address.
edit_command(+Editor, -Command)[multifile]- This predicate should specify the shell-command called to invoke
the user's editor. The following substitutions will be made:
| %e | Path name of the editor |
| %f | Path name of the file to be edited |
| %d | Line number of the target |
select_location(+Pairs, +UserSpec, -Location) is semidet[multifile]-
- Arguments:
-
| Pairs | - is a list of Location-Spec pairs |
| Location | - is a list of properties |