6.5 Completion
This is a minor mode that saves words greater than three characters in length,
allowing later completion of those words. This is very useful for the often
long identifiers used in Lisp programs. As you type a word, such as a Lisp
symbol when in Lisp mode, and you progress to typing the third letter,
Hemlock displays a possible completion in the status line. You can then
rotate through the possible completions or type some more letters to narrow
down the possibilities. If you choose a completion, you can also rotate
through the possibilities in the buffer instead of in the status line.
Choosing a completion or inserting a character that delimits words moves the
word forward in the ring of possible completions, so the next time you enter
its initial characters, Hemlock will prefer it over less recently used
completions. [annotate]
| Completion Mode | | [Command] |
| Completion Self Insert | | [Command] |
| |
This command is like Self Insert, but it also checks for possible
completions displaying any result in the status line. This is bound to most of
the key-events with corresponding graphic characters.
[annotate] [annotate] |
| Completion Complete Word | (bound to Completion: End) | [Command] |
| |
This command selects the currently displayed completion if there is one,
guessing the case of the inserted text as with Query Replace. Invoking
this immediately in succession rotates through possible completions in the
buffer. If there is no currently displayed completion on a first invocation,
this tries to find a completion from text immediately before the point and
displays the completion if found.
[annotate] [annotate] |
| Completion Rotate Completions | (bound to Completion: M-End) | [Command] |
| |
This command displays the next possible completion in the status line. If
there is no currently displayed completion, this tries to find a completion
from text immediately before the point and displays the completion if found.
[annotate] [annotate] |
| List Possible Completions | | [Command] |
| |
This command lists all the possible completions for the text immediately before
the point in a pop-up display. Sometimes this is more useful than rotating
through several completions to see if what you want is available.
[annotate] [annotate] |
| Completion Bucket Size | (initial value 20) | [Variable] |
| |
Completions are stored in buckets determined by the first three letters of a
word. This variable limits the number of completions saved for each combination
of the first three letters of a word. If you have many identifier in some
module beginning with the same first three letters, you'll need increase this
variable to accommodate all the names.
[annotate] [annotate] |
| Save Completions | | [Command] |
| Read Completions | | [Command] |
| Completion Database Filename | (initial value nil) | [Variable] |
| | Save Completions writes the current completions to the file
Completion Database Filename. It writes them, so Read Completions
can read them back in preserving the most-recently-used order. If the user
supplies an argument, then this prompts for a pathname. [annotate] Read Completions reads completions saved in Completion Database
Filename. It moves any current completions to a less-recently-used status,
and it removes any in a given bucket that exceed the limit Completion
Bucket Size.
[annotate] [annotate] |
| Parse Buffer for Completions | | [Command] |
| |
This command passes over the current buffer putting each valid completion word
into the database. This is a good way of picking up many useful completions
upon visiting a new file for which there are no saved completions.
[annotate] [annotate] |