xref: /aosp_15_r20/external/mksh/src/emacsfn.h (revision 7c356e860f31eadd15fd599fcfdb9fd21f16a9d4)
1*7c356e86SAndroid Build Coastguard Worker /*-
2*7c356e86SAndroid Build Coastguard Worker  * Copyright (c) 2009, 2010, 2015, 2016, 2020
3*7c356e86SAndroid Build Coastguard Worker  *	mirabilos <[email protected]>
4*7c356e86SAndroid Build Coastguard Worker  *
5*7c356e86SAndroid Build Coastguard Worker  * Provided that these terms and disclaimer and all copyright notices
6*7c356e86SAndroid Build Coastguard Worker  * are retained or reproduced in an accompanying document, permission
7*7c356e86SAndroid Build Coastguard Worker  * is granted to deal in this work without restriction, including un-
8*7c356e86SAndroid Build Coastguard Worker  * limited rights to use, publicly perform, distribute, sell, modify,
9*7c356e86SAndroid Build Coastguard Worker  * merge, give away, or sublicence.
10*7c356e86SAndroid Build Coastguard Worker  *
11*7c356e86SAndroid Build Coastguard Worker  * This work is provided "AS IS" and WITHOUT WARRANTY of any kind, to
12*7c356e86SAndroid Build Coastguard Worker  * the utmost extent permitted by applicable law, neither express nor
13*7c356e86SAndroid Build Coastguard Worker  * implied; without malicious intent or gross negligence. In no event
14*7c356e86SAndroid Build Coastguard Worker  * may a licensor, author or contributor be held liable for indirect,
15*7c356e86SAndroid Build Coastguard Worker  * direct, other damage, loss, or other issues arising in any way out
16*7c356e86SAndroid Build Coastguard Worker  * of dealing in the work, even if advised of the possibility of such
17*7c356e86SAndroid Build Coastguard Worker  * damage or existence of a defect, except proven that it results out
18*7c356e86SAndroid Build Coastguard Worker  * of said person's immediate fault when using the work as intended.
19*7c356e86SAndroid Build Coastguard Worker  */
20*7c356e86SAndroid Build Coastguard Worker 
21*7c356e86SAndroid Build Coastguard Worker #if defined(EMACSFN_DEFNS)
22*7c356e86SAndroid Build Coastguard Worker __RCSID("$MirOS: src/bin/mksh/emacsfn.h,v 1.11 2020/04/13 20:46:39 tg Exp $");
23*7c356e86SAndroid Build Coastguard Worker #define FN(cname,sname,flags)	static int x_##cname(int);
24*7c356e86SAndroid Build Coastguard Worker #elif defined(EMACSFN_ENUMS)
25*7c356e86SAndroid Build Coastguard Worker #define FN(cname,sname,flags)	XFUNC_##cname,
26*7c356e86SAndroid Build Coastguard Worker #define F0(cname,sname,flags)	XFUNC_##cname = 0,
27*7c356e86SAndroid Build Coastguard Worker #elif defined(EMACSFN_ITEMS)
28*7c356e86SAndroid Build Coastguard Worker #define FN(cname,sname,flags)	{ x_##cname, sname, flags },
29*7c356e86SAndroid Build Coastguard Worker #endif
30*7c356e86SAndroid Build Coastguard Worker 
31*7c356e86SAndroid Build Coastguard Worker #ifndef F0
32*7c356e86SAndroid Build Coastguard Worker #define F0 FN
33*7c356e86SAndroid Build Coastguard Worker #endif
34*7c356e86SAndroid Build Coastguard Worker 
35*7c356e86SAndroid Build Coastguard Worker F0(abort, "abort", 0)
36*7c356e86SAndroid Build Coastguard Worker FN(beg_hist, "beginning-of-history", 0)
37*7c356e86SAndroid Build Coastguard Worker FN(cls, "clear-screen", 0)
38*7c356e86SAndroid Build Coastguard Worker FN(comment, "comment", 0)
39*7c356e86SAndroid Build Coastguard Worker FN(comp_comm, "complete-command", 0)
40*7c356e86SAndroid Build Coastguard Worker FN(comp_file, "complete-file", 0)
41*7c356e86SAndroid Build Coastguard Worker FN(comp_list, "complete-list", 0)
42*7c356e86SAndroid Build Coastguard Worker FN(complete, "complete", 0)
43*7c356e86SAndroid Build Coastguard Worker FN(del_back, "delete-char-backward", XF_ARG)
44*7c356e86SAndroid Build Coastguard Worker FN(del_bword, "delete-word-backward", XF_ARG)
45*7c356e86SAndroid Build Coastguard Worker FN(del_char, "delete-char-forward", XF_ARG)
46*7c356e86SAndroid Build Coastguard Worker FN(del_fword, "delete-word-forward", XF_ARG)
47*7c356e86SAndroid Build Coastguard Worker FN(del_line, "kill-line", 0)
48*7c356e86SAndroid Build Coastguard Worker FN(draw_line, "redraw", 0)
49*7c356e86SAndroid Build Coastguard Worker #ifndef MKSH_SMALL
50*7c356e86SAndroid Build Coastguard Worker FN(edit_line, "edit-line", XF_ARG)
51*7c356e86SAndroid Build Coastguard Worker #endif
52*7c356e86SAndroid Build Coastguard Worker FN(end_hist, "end-of-history", 0)
53*7c356e86SAndroid Build Coastguard Worker FN(end_of_text, "eot", 0)
54*7c356e86SAndroid Build Coastguard Worker FN(enumerate, "list", 0)
55*7c356e86SAndroid Build Coastguard Worker FN(eot_del, "eot-or-delete", XF_ARG)
56*7c356e86SAndroid Build Coastguard Worker FN(error, "error", 0)
57*7c356e86SAndroid Build Coastguard Worker #ifndef MKSH_SMALL
58*7c356e86SAndroid Build Coastguard Worker FN(eval_region, "evaluate-region", 0)
59*7c356e86SAndroid Build Coastguard Worker #endif
60*7c356e86SAndroid Build Coastguard Worker FN(expand, "expand-file", 0)
61*7c356e86SAndroid Build Coastguard Worker #ifndef MKSH_SMALL
62*7c356e86SAndroid Build Coastguard Worker FN(fold_capitalise, "capitalize-word", XF_ARG)
63*7c356e86SAndroid Build Coastguard Worker FN(fold_lower, "downcase-word", XF_ARG)
64*7c356e86SAndroid Build Coastguard Worker FN(fold_upper, "upcase-word", XF_ARG)
65*7c356e86SAndroid Build Coastguard Worker #endif
66*7c356e86SAndroid Build Coastguard Worker FN(goto_hist, "goto-history", XF_ARG)
67*7c356e86SAndroid Build Coastguard Worker #ifndef MKSH_SMALL
68*7c356e86SAndroid Build Coastguard Worker FN(ins_string, "macro-string", XF_NOBIND)
69*7c356e86SAndroid Build Coastguard Worker #endif
70*7c356e86SAndroid Build Coastguard Worker FN(insert, "auto-insert", XF_ARG)
71*7c356e86SAndroid Build Coastguard Worker FN(kill, "kill-to-eol", XF_ARG)
72*7c356e86SAndroid Build Coastguard Worker FN(kill_region, "kill-region", 0)
73*7c356e86SAndroid Build Coastguard Worker FN(list_comm, "list-command", 0)
74*7c356e86SAndroid Build Coastguard Worker FN(list_file, "list-file", 0)
75*7c356e86SAndroid Build Coastguard Worker FN(literal, "quote", 0)
76*7c356e86SAndroid Build Coastguard Worker FN(meta1, "prefix-1", XF_PREFIX)
77*7c356e86SAndroid Build Coastguard Worker FN(meta2, "prefix-2", XF_PREFIX)
78*7c356e86SAndroid Build Coastguard Worker FN(meta3, "prefix-3", XF_PREFIX)
79*7c356e86SAndroid Build Coastguard Worker FN(meta_yank, "yank-pop", 0)
80*7c356e86SAndroid Build Coastguard Worker FN(mv_back, "backward-char", XF_ARG)
81*7c356e86SAndroid Build Coastguard Worker FN(mv_beg, "beginning-of-line", 0)
82*7c356e86SAndroid Build Coastguard Worker FN(mv_bword, "backward-word", XF_ARG)
83*7c356e86SAndroid Build Coastguard Worker FN(mv_end, "end-of-line", 0)
84*7c356e86SAndroid Build Coastguard Worker FN(mv_forw, "forward-char", XF_ARG)
85*7c356e86SAndroid Build Coastguard Worker FN(mv_fword, "forward-word", XF_ARG)
86*7c356e86SAndroid Build Coastguard Worker FN(newline, "newline", 0)
87*7c356e86SAndroid Build Coastguard Worker FN(next_com, "down-history", XF_ARG)
88*7c356e86SAndroid Build Coastguard Worker FN(nl_next_com, "newline-and-next", 0)
89*7c356e86SAndroid Build Coastguard Worker FN(noop, "no-op", 0)
90*7c356e86SAndroid Build Coastguard Worker FN(prev_com, "up-history", XF_ARG)
91*7c356e86SAndroid Build Coastguard Worker FN(prev_histword, "prev-hist-word", XF_ARG)
92*7c356e86SAndroid Build Coastguard Worker #ifndef MKSH_SMALL
93*7c356e86SAndroid Build Coastguard Worker FN(quote_region, "quote-region", 0)
94*7c356e86SAndroid Build Coastguard Worker #endif
95*7c356e86SAndroid Build Coastguard Worker FN(search_char_back, "search-character-backward", XF_ARG)
96*7c356e86SAndroid Build Coastguard Worker FN(search_char_forw, "search-character-forward", XF_ARG)
97*7c356e86SAndroid Build Coastguard Worker FN(search_hist, "search-history", 0)
98*7c356e86SAndroid Build Coastguard Worker #ifndef MKSH_SMALL
99*7c356e86SAndroid Build Coastguard Worker FN(search_hist_dn, "search-history-down", 0)
100*7c356e86SAndroid Build Coastguard Worker FN(search_hist_up, "search-history-up", 0)
101*7c356e86SAndroid Build Coastguard Worker #endif
102*7c356e86SAndroid Build Coastguard Worker FN(set_arg, "set-arg", XF_NOBIND)
103*7c356e86SAndroid Build Coastguard Worker FN(set_mark, "set-mark-command", 0)
104*7c356e86SAndroid Build Coastguard Worker FN(transpose, "transpose-chars", 0)
105*7c356e86SAndroid Build Coastguard Worker FN(version, "version", 0)
106*7c356e86SAndroid Build Coastguard Worker #ifndef MKSH_SMALL
107*7c356e86SAndroid Build Coastguard Worker FN(vt_hack, "vt100-hack", XF_ARG)
108*7c356e86SAndroid Build Coastguard Worker #endif
109*7c356e86SAndroid Build Coastguard Worker FN(xchg_point_mark, "exchange-point-and-mark", 0)
110*7c356e86SAndroid Build Coastguard Worker FN(yank, "yank", 0)
111*7c356e86SAndroid Build Coastguard Worker 
112*7c356e86SAndroid Build Coastguard Worker #undef FN
113*7c356e86SAndroid Build Coastguard Worker #undef F0
114*7c356e86SAndroid Build Coastguard Worker #undef EMACSFN_DEFNS
115*7c356e86SAndroid Build Coastguard Worker #undef EMACSFN_ENUMS
116*7c356e86SAndroid Build Coastguard Worker #undef EMACSFN_ITEMS
117