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