bug-readline
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-readline] 8.0-alpha : a trivial typo in info


From: 林宏雄
Subject: Re: [Bug-readline] 8.0-alpha : a trivial typo in info
Date: Wed, 20 Jun 2018 00:14:00 +0900

It's needed for any external program that wants to find a function bound
to an arbitrary key sequence that may include NULs.

Read the thread starting at

http://lists.gnu.org/archive/html/bug-bash/2018-03/msg00165.html

for a discussion of the issue.

I checked the bind.c.
Now I understand.

@deftypefun {rl_command_func_t *} rl_function_of_keyseq (const char *keyseq, Keymap map, int *type)
@deftypefun {rl_command_func_t *} rl_function_of_keyseq_len (const char *keyseq, size_t len, Keymap map, int *type)

keyseq for them are raw (translated) key sequence.  len is required for a key sequence that may include NULs.

@deftypefun int rl_bind_keyseq_if_unbound (const char *keyseq, rl_command_func_t *function)
@deftypefun int rl_bind_keyseq_if_unbound_in_map (const char *keyseq, rl_command_func_t *function, Keymap map)
@deftypefun int rl_macro_bind (const char *keyseq, const char *macro, Keymap map)
@deftypefun int rl_generic_bind (int type, const char *keyseq, char *data, Keymap map)
@deftypefun int rl_bind_keyseq (const char *keyseq, rl_command_func_t *function)
@deftypefun int rl_bind_keyseq_in_map (const char *keyseq, rl_command_func_t *function, Keymap map)
@deftypefun int rl_set_key (const char *keyseq, rl_command_func_t *function, Keymap map)

They call rl_translate_keyseq and accept both translated and untranslated form.
Untranslated form (\C-@) must be used for a key sequence that includes NULs.

I also think there should be some description about this as the reporter of the patch wrote.  
--
Hiroo Hayashi

reply via email to

[Prev in Thread] Current Thread [Next in Thread]