Previous Contents
7.29 Linedit management
The following predicates are only available if the linedit[default]linedit@linedit7.29htoc part of GNU Prolog has been installed.

7.29.1 get_linedit_prompt/1
[default]get_linedit_prompt/1@get_linedit_prompt/1|textbf7.29.1htoc
Templates

get_linedit_prompt(?atom)
Description

get_linedit_prompt(Prompt) succeeds if Prompt is the current linedit[default]linedit@linedit7.29.1htoc prompt, e.g. the top-level[default]top-level@top-level7.29.1htoc prompt is '| ?-'. By default all other reads have an empty prompt.

Errors

Prompt is neither a variable nor an atom    type_error(atom, Pred)

Portability

GNU Prolog predicate.

7.29.2 set_linedit_prompt/1
[default]set_linedit_prompt/1@set_linedit_prompt/1|textbf7.29.2htoc
Templates

set_linedit_prompt(+atom)
Description

set_linedit_prompt(Prompt) sets the current linedit[default]linedit@linedit7.29.2htoc prompt to Prompt. This prompt will be displayed for reads from a terminal (except for top-level[default]top-level@top-level7.29.2htoc reads).

Errors

Prompt is a variable    instantiation_error
Prompt is neither a variable nor an atom    type_error(atom, Pred)

Portability

GNU Prolog predicate.

7.29.3 add_linedit_completion/1
[default]add_linedit_completion/1@add_linedit_completion/1|textbf7.29.3htoc
Templates

add_linedit_completion(+atom)
Description

add_linedit_completion(Word) adds Word in the list of completion[default]completion@completion7.29.3htoc words maintained by linedit[default]linedit@linedit7.29.3htoc (section 3.2.5). Only words containing letters, digits and the underscore character are added (if Word does not respect this restriction the predicate fails).

Errors

Word is a variable    instantiation_error
Word is neither a variable nor an atom    type_error(atom, Word)

Portability

GNU Prolog predicate.

7.29.4 find_linedit_completion/2
[default]find_linedit_completion/2@find_linedit_completion/2|textbf7.29.4htoc
Templates

find_linedit_completion(+atom, ?atom)
Description

find_linedit_completion(Prefix, Word) succeeds if Word is a word beginning by Prefix and belongs to the list of completion[default]completion@completion7.29.4htoc words maintained by linedit[default]linedit@linedit7.29.4htoc (section 3.2.5). This predicate is re-executable on backtracking.

Errors

Prefix is a variable    instantiation_error
Prefix is neither a variable nor an atom    type_error(atom, Prefix)
Word is neither a variable nor an atom    type_error(atom, Word)

Portability

GNU Prolog predicate.


Copyright (C) 1999-2001 Daniel Diaz

Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved.

More about the copyright
Previous Contents