Add el_bind_key_in_metamap() from Festival speech-tools.

Support for Meta key binding imported from Festival speech-tools, author
Alan W Black <awb()cstr!ed!ac!uk>.  Code released under the original license.
This commit is contained in:
Joachim Nilsson
2010-07-25 22:17:10 +02:00
parent 0d9ce0ce06
commit 20c55a58da
2 changed files with 50 additions and 10 deletions

View File

@@ -21,9 +21,15 @@
#ifndef __EDITLINE_H__
#define __EDITLINE_H__
/* Command status codes. */
typedef enum {
CSdone, CSeof, CSmove, CSdispatch, CSstay, CSsignal
} el_status_t;
/* Editline specific types, despite rl_ prefix. From Heimdal project. */
typedef char* (*rl_complete_func_t)(char*, int*);
typedef int (*rl_list_possib_func_t)(char*, char***);
typedef el_status_t (*el_keymap_func_t)(void);
/* Display 8-bit chars "as-is" or as `M-x'? Toggle with M-m. (Default:0 - "as-is") */
extern int rl_meta_chars;
@@ -33,6 +39,7 @@ rl_complete_func_t rl_set_complete_func(rl_complete_func_t func);
rl_list_possib_func_t rl_set_list_possib_func(rl_list_possib_func_t func);
/* Editline specific functions. */
void el_bind_key_in_metamap(char c, el_keymap_func_t func);
/* For compatibility with FSF readline. */
extern int rl_point;