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