bind -a
(see el_bind/2)
and Goal is called of the associated key-binding is
activated. Goal is called as
call(:Goal, +Input, +Char, -Continue)
where Input is the input stream providing access to the
editor, Char the activating character and Continue must be instantated
with one of the known continuation codes as defined by libedit: norm
,
newline
, eof
, arghack
, refresh
, refresh_beep
, cursor
,
redisplay
, error
or fatal
. In
addition, the following Continue code is provided.
- electric(Move, TimeOut, Continue)
- Show electric caret at Move positions to the left of the normal cursor positions for the given TimeOut. Continue as defined by the Continue value.
The registered Goal typically used el_line/2 to fetch the input line and el_cursor/2, el_insertstr/2 and/or el_deletestr/2 to manipulate the input line.
Normally el_bind/2 is used to associate the defined command with a keyboard sequence.
- See also
el_set(3)
EL_ADDFN
for details.