]> git.llucax.com Git - software/mutt-debian.git/blob - functions.h
fix index weirdness if mailbox is emptied while inside the pager (Closes: 375530)
[software/mutt-debian.git] / functions.h
1 /*
2  * Copyright (C) 1996-2000,2002 Michael R. Elkins <me@mutt.org>
3  * 
4  *     This program is free software; you can redistribute it and/or modify
5  *     it under the terms of the GNU General Public License as published by
6  *     the Free Software Foundation; either version 2 of the License, or
7  *     (at your option) any later version.
8  * 
9  *     This program is distributed in the hope that it will be useful,
10  *     but WITHOUT ANY WARRANTY; without even the implied warranty of
11  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  *     GNU General Public License for more details.
13  * 
14  *     You should have received a copy of the GNU General Public License
15  *     along with this program; if not, write to the Free Software
16  *     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
17  */ 
18
19 /*
20  * This file contains the structures needed to parse ``bind'' commands, as
21  * well as the default bindings for each menu.
22  *
23  * Notes:
24  *
25  * - If you want to bind \n or \r, use M_ENTER_S so that it will work
26  * correctly under both ncurses and S-Lang
27  *
28  * - If you need to bind a control char, use the octal value because the \cX
29  * construct does not work at this level.
30  *
31  * - The magic "map:" comments define how the map will be called in the
32  * manual. Lines starting with "**" will be included in the manual.
33  *
34  */
35
36 #ifdef _MAKEDOC
37 # include "config.h"
38 # include "doc/makedoc-defs.h"
39 #endif
40
41 struct binding_t OpGeneric[] = { /* map: generic */
42   /*
43   ** <para>
44   ** The <emphasis>generic</emphasis> menu is not a real menu, but specifies common functions
45   ** (such as movement) available in all menus except for <emphasis>pager</emphasis> and
46   ** <emphasis>editor</emphasis>.  Changing settings for this menu will affect the default
47   ** bindings for all menus (except as noted).
48   ** </para>
49   */
50   { "top-page",         OP_TOP_PAGE,            "H" },
51   { "next-entry",       OP_NEXT_ENTRY,          "j" },
52   { "previous-entry",   OP_PREV_ENTRY,          "k" },
53   { "bottom-page",      OP_BOTTOM_PAGE,         "L" },
54   { "refresh",          OP_REDRAW,              "\014" },
55   { "middle-page",      OP_MIDDLE_PAGE,         "M" },
56   { "search-next",      OP_SEARCH_NEXT,         "n" },
57   { "exit",             OP_EXIT,                "q" },
58   { "tag-entry",        OP_TAG,                 "t" },
59   { "next-page",        OP_NEXT_PAGE,           "z" },
60   { "previous-page",    OP_PREV_PAGE,           "Z" },
61   { "last-entry",       OP_LAST_ENTRY,          "*" },
62   { "first-entry",      OP_FIRST_ENTRY,         "=" },
63   { "enter-command",    OP_ENTER_COMMAND,       ":" },
64   { "next-line",        OP_NEXT_LINE,           ">" },
65   { "previous-line",    OP_PREV_LINE,           "<" },
66   { "half-up",          OP_HALF_UP,             "[" },
67   { "half-down",        OP_HALF_DOWN,           "]" },
68   { "help",             OP_HELP,                "?" },
69   { "tag-prefix",       OP_TAG_PREFIX,          ";" },
70   { "tag-prefix-cond",  OP_TAG_PREFIX_COND,     NULL },
71   { "end-cond",         OP_END_COND,            NULL },
72   { "shell-escape",     OP_SHELL_ESCAPE,        "!" },
73   { "select-entry",     OP_GENERIC_SELECT_ENTRY,M_ENTER_S },
74   { "search",           OP_SEARCH,              "/" },
75   { "search-reverse",   OP_SEARCH_REVERSE,      "\033/" },
76   { "search-opposite",  OP_SEARCH_OPPOSITE,     NULL },
77   { "jump",             OP_JUMP,                NULL },
78   { "current-top",      OP_CURRENT_TOP,         NULL },
79   { "current-middle",   OP_CURRENT_MIDDLE,      NULL },
80   { "current-bottom",   OP_CURRENT_BOTTOM,      NULL },
81   { "what-key",         OP_WHAT_KEY,            NULL },
82   { NULL,               0,                      NULL }
83 };
84
85 struct binding_t OpMain[] = { /* map: index */
86   { "create-alias",             OP_CREATE_ALIAS,                "a" },
87   { "bounce-message",           OP_BOUNCE_MESSAGE,              "b" },
88   { "break-thread",             OP_MAIN_BREAK_THREAD,           "#" },
89   { "change-folder",            OP_MAIN_CHANGE_FOLDER,          "c" },
90   { "change-folder-readonly",   OP_MAIN_CHANGE_FOLDER_READONLY, "\033c" },
91   { "next-unread-mailbox",      OP_MAIN_NEXT_UNREAD_MAILBOX,    NULL },
92   { "collapse-thread",          OP_MAIN_COLLAPSE_THREAD,        "\033v" },
93   { "collapse-all",             OP_MAIN_COLLAPSE_ALL,           "\033V" },
94   { "copy-message",             OP_COPY_MESSAGE,                "C" },
95   { "decode-copy",              OP_DECODE_COPY,                 "\033C" },
96   { "decode-save",              OP_DECODE_SAVE,                 "\033s" },
97   { "delete-message",           OP_DELETE,                      "d" },
98   { "delete-pattern",           OP_MAIN_DELETE_PATTERN,         "D" },
99   { "delete-thread",            OP_DELETE_THREAD,               "\004" },
100   { "delete-subthread",         OP_DELETE_SUBTHREAD,            "\033d" },
101   { "edit",                     OP_EDIT_MESSAGE,                "e" },
102   { "edit-type",                OP_EDIT_TYPE,                   "\005" },
103   { "forward-message",          OP_FORWARD_MESSAGE,             "f" },
104   { "flag-message",             OP_FLAG_MESSAGE,                "F" },
105   { "group-reply",              OP_GROUP_REPLY,                 "g" },
106 #ifdef USE_POP
107   { "fetch-mail",               OP_MAIN_FETCH_MAIL,             "G" },
108 #endif
109 #ifdef USE_IMAP
110   { "imap-fetch-mail",          OP_MAIN_IMAP_FETCH,             NULL },
111 #endif
112   { "display-toggle-weed",              OP_DISPLAY_HEADERS,             "h" },
113   { "next-undeleted",           OP_MAIN_NEXT_UNDELETED,         "j" },
114   { "previous-undeleted",       OP_MAIN_PREV_UNDELETED,         "k" },
115   { "limit",                    OP_MAIN_LIMIT,                  "l" },
116   { "link-threads",             OP_MAIN_LINK_THREADS,           "&" },
117   { "list-reply",               OP_LIST_REPLY,                  "L" },
118   { "mail",                     OP_MAIL,                        "m" },
119   { "toggle-new",               OP_TOGGLE_NEW,                  "N" },
120   { "toggle-write",             OP_TOGGLE_WRITE,                "%" },
121   { "next-thread",              OP_MAIN_NEXT_THREAD,            "\016" },
122   { "next-subthread",           OP_MAIN_NEXT_SUBTHREAD,         "\033n" },
123   { "query",                    OP_QUERY,                       "Q" },
124   { "quit",                     OP_QUIT,                        "q" },
125   { "reply",                    OP_REPLY,                       "r" },
126   { "show-limit",               OP_MAIN_SHOW_LIMIT,             "\033l" },
127   { "sort-mailbox",             OP_SORT,                        "o" },
128   { "sort-reverse",             OP_SORT_REVERSE,                "O" },
129   { "print-message",            OP_PRINT,                       "p" },
130   { "previous-thread",          OP_MAIN_PREV_THREAD,            "\020" },
131   { "previous-subthread",       OP_MAIN_PREV_SUBTHREAD,         "\033p" },
132   { "recall-message",           OP_RECALL_MESSAGE,              "R" },
133   { "read-thread",              OP_MAIN_READ_THREAD,            "\022" },
134   { "read-subthread",           OP_MAIN_READ_SUBTHREAD,         "\033r" },
135   { "resend-message",           OP_RESEND,                      "\033e" },
136   { "save-message",             OP_SAVE,                        "s" },
137   { "tag-pattern",              OP_MAIN_TAG_PATTERN,            "T" },
138   { "tag-subthread",            OP_TAG_SUBTHREAD,               NULL },
139   { "tag-thread",               OP_TAG_THREAD,                  "\033t" },
140   { "untag-pattern",            OP_MAIN_UNTAG_PATTERN,          "\024" },
141   { "undelete-message",         OP_UNDELETE,                    "u" },
142   { "undelete-pattern",         OP_MAIN_UNDELETE_PATTERN,       "U"},
143   { "undelete-subthread",       OP_UNDELETE_SUBTHREAD,          "\033u" },
144   { "undelete-thread",          OP_UNDELETE_THREAD,             "\025" },
145   { "view-attachments",         OP_VIEW_ATTACHMENTS,            "v" },
146   { "show-version",             OP_VERSION,                     "V" },
147   { "set-flag",                 OP_MAIN_SET_FLAG,               "w" },
148   { "clear-flag",               OP_MAIN_CLEAR_FLAG,             "W" },
149   { "display-message",          OP_DISPLAY_MESSAGE,             M_ENTER_S },
150   { "buffy-list",               OP_BUFFY_LIST,                  "." },
151   { "sync-mailbox",             OP_MAIN_SYNC_FOLDER,            "$" },
152   { "display-address",          OP_DISPLAY_ADDRESS,             "@" },
153   { "pipe-message",             OP_PIPE,                        "|" },
154   { "next-new",                 OP_MAIN_NEXT_NEW,               NULL },
155   { "next-new-then-unread",     OP_MAIN_NEXT_NEW_THEN_UNREAD,   "\t" },
156   { "previous-new",             OP_MAIN_PREV_NEW,               NULL },
157   { "previous-new-then-unread", OP_MAIN_PREV_NEW_THEN_UNREAD,   "\033\t" },
158   { "next-unread",              OP_MAIN_NEXT_UNREAD,            NULL },
159   { "previous-unread",          OP_MAIN_PREV_UNREAD,            NULL },
160   { "parent-message",           OP_MAIN_PARENT_MESSAGE,         "P" },
161
162
163   { "extract-keys",             OP_EXTRACT_KEYS,                "\013" },
164   { "forget-passphrase",        OP_FORGET_PASSPHRASE,           "\006" },
165   { "check-traditional-pgp",    OP_CHECK_TRADITIONAL,           "\033P" },
166   { "mail-key",                 OP_MAIL_KEY,                    "\033k" },
167   { "decrypt-copy",             OP_DECRYPT_COPY,                NULL },
168   { "decrypt-save",             OP_DECRYPT_SAVE,                NULL },
169
170
171   { NULL,                       0,                              NULL }
172 };
173
174 struct binding_t OpPager[] = { /* map: pager */
175   { "break-thread",     OP_MAIN_BREAK_THREAD,           "#" },
176   { "create-alias",     OP_CREATE_ALIAS,                "a" },
177   { "bounce-message",   OP_BOUNCE_MESSAGE,              "b" },
178   { "change-folder",    OP_MAIN_CHANGE_FOLDER,          "c" },
179   { "change-folder-readonly",   OP_MAIN_CHANGE_FOLDER_READONLY, "\033c" },
180   { "next-unread-mailbox",      OP_MAIN_NEXT_UNREAD_MAILBOX, NULL },
181   { "copy-message",     OP_COPY_MESSAGE,                "C" },
182   { "decode-copy",      OP_DECODE_COPY,                 "\033C" },
183   { "delete-message",   OP_DELETE,                      "d" },
184   { "delete-thread",    OP_DELETE_THREAD,               "\004" },
185   { "delete-subthread", OP_DELETE_SUBTHREAD,            "\033d" },
186   { "edit",             OP_EDIT_MESSAGE,                "e" },
187   { "edit-type",        OP_EDIT_TYPE,                   "\005" },
188   { "forward-message",  OP_FORWARD_MESSAGE,             "f" },
189   { "flag-message",     OP_FLAG_MESSAGE,                "F" },
190   { "group-reply",      OP_GROUP_REPLY,                 "g" },
191 #ifdef USE_IMAP
192   { "imap-fetch-mail",  OP_MAIN_IMAP_FETCH,             NULL },
193 #endif
194   { "display-toggle-weed",      OP_DISPLAY_HEADERS,             "h" },
195   { "next-undeleted",   OP_MAIN_NEXT_UNDELETED,         "j" },
196   { "next-entry",       OP_NEXT_ENTRY,                  "J" },
197   { "previous-undeleted",OP_MAIN_PREV_UNDELETED,        "k" },
198   { "previous-entry",   OP_PREV_ENTRY,                  "K" },
199   { "link-threads",     OP_MAIN_LINK_THREADS,           "&" },
200   { "list-reply",       OP_LIST_REPLY,                  "L" },
201   { "redraw-screen",    OP_REDRAW,                      "\014" },
202   { "mail",             OP_MAIL,                        "m" },
203   { "mark-as-new",      OP_TOGGLE_NEW,                  "N" },
204   { "search-next",      OP_SEARCH_NEXT,                 "n" },
205   { "next-thread",      OP_MAIN_NEXT_THREAD,            "\016" },
206   { "next-subthread",   OP_MAIN_NEXT_SUBTHREAD,         "\033n" },
207   { "print-message",    OP_PRINT,                       "p" },
208   { "previous-thread",  OP_MAIN_PREV_THREAD,            "\020" },
209   { "previous-subthread",OP_MAIN_PREV_SUBTHREAD,        "\033p" },
210   { "quit",             OP_QUIT,                        "Q" },
211   { "exit",             OP_EXIT,                        "q" },
212   { "reply",            OP_REPLY,                       "r" },
213   { "recall-message",   OP_RECALL_MESSAGE,              "R" },
214   { "read-thread",      OP_MAIN_READ_THREAD,            "\022" },
215   { "read-subthread",   OP_MAIN_READ_SUBTHREAD,         "\033r" },
216   { "resend-message",   OP_RESEND,                      "\033e" },
217   { "save-message",     OP_SAVE,                        "s" },
218   { "skip-quoted",      OP_PAGER_SKIP_QUOTED,           "S" },
219   { "decode-save",      OP_DECODE_SAVE,                 "\033s" },
220   { "tag-message",      OP_TAG,                         "t" },
221   { "toggle-quoted",    OP_PAGER_HIDE_QUOTED,           "T" },
222   { "undelete-message", OP_UNDELETE,                    "u" },
223   { "undelete-subthread",OP_UNDELETE_SUBTHREAD,         "\033u" },
224   { "undelete-thread",  OP_UNDELETE_THREAD,             "\025" },
225   { "view-attachments", OP_VIEW_ATTACHMENTS,            "v" },
226   { "show-version",     OP_VERSION,                     "V" },
227   { "search-toggle",    OP_SEARCH_TOGGLE,               "\\" },
228   { "display-address",  OP_DISPLAY_ADDRESS,             "@" },
229   { "next-new",         OP_MAIN_NEXT_NEW,               NULL },
230   { "next-new-then-unread", 
231                         OP_MAIN_NEXT_NEW_THEN_UNREAD,   "\t" },
232   { "pipe-message",     OP_PIPE,                        "|" },
233   { "help",             OP_HELP,                        "?" },
234   { "next-page",        OP_NEXT_PAGE,                   " " },
235   { "previous-page",    OP_PREV_PAGE,                   "-" },
236   { "top",              OP_PAGER_TOP,                   "^" },
237   { "sync-mailbox",     OP_MAIN_SYNC_FOLDER,            "$" },
238   { "shell-escape",     OP_SHELL_ESCAPE,                "!" },
239   { "enter-command",    OP_ENTER_COMMAND,               ":" },
240   { "buffy-list",       OP_BUFFY_LIST,                  "." },
241   { "search",           OP_SEARCH,                      "/" },
242   { "search-reverse",   OP_SEARCH_REVERSE,              "\033/" },
243   { "search-opposite",  OP_SEARCH_OPPOSITE,             NULL },
244   { "next-line",        OP_NEXT_LINE,                   M_ENTER_S },
245   { "jump",             OP_JUMP,                        NULL },
246   { "next-unread",      OP_MAIN_NEXT_UNREAD,            NULL },
247   { "previous-new",     OP_MAIN_PREV_NEW,               NULL },
248   { "previous-new-then-unread",
249                         OP_MAIN_PREV_NEW_THEN_UNREAD,   NULL },
250   { "previous-unread",  OP_MAIN_PREV_UNREAD,            NULL },
251   { "half-up",          OP_HALF_UP,                     NULL },
252   { "half-down",        OP_HALF_DOWN,                   NULL },
253   { "previous-line",    OP_PREV_LINE,                   NULL },
254   { "bottom",           OP_PAGER_BOTTOM,                NULL },
255   { "parent-message",   OP_MAIN_PARENT_MESSAGE,         "P" },
256
257
258
259
260   { "check-traditional-pgp",    OP_CHECK_TRADITIONAL,   "\033P"   },
261   { "mail-key",         OP_MAIL_KEY,                    "\033k" },
262   { "extract-keys",     OP_EXTRACT_KEYS,                "\013" },
263   { "forget-passphrase",OP_FORGET_PASSPHRASE,           "\006" },
264   { "decrypt-copy",     OP_DECRYPT_COPY,                NULL },
265   { "decrypt-save",     OP_DECRYPT_SAVE,                NULL },
266
267   { "what-key",         OP_WHAT_KEY,            NULL },
268
269   { NULL,               0,                              NULL }
270 };
271
272 struct binding_t OpAttach[] = { /* map: attach */
273   { "bounce-message",   OP_BOUNCE_MESSAGE,              "b" },
274   { "display-toggle-weed",      OP_DISPLAY_HEADERS,     "h" },
275   { "edit-type",        OP_EDIT_TYPE,                   "\005" },
276   { "print-entry",      OP_PRINT,                       "p" },
277   { "save-entry",       OP_SAVE,                        "s" },
278   { "pipe-entry",       OP_PIPE,                        "|" },
279   { "view-mailcap",     OP_ATTACH_VIEW_MAILCAP,         "m" },
280   { "reply",            OP_REPLY,                       "r" },
281   { "resend-message",   OP_RESEND,                      "\033e" },
282   { "group-reply",      OP_GROUP_REPLY,                 "g" },
283   { "list-reply",       OP_LIST_REPLY,                  "L" },
284   { "forward-message",  OP_FORWARD_MESSAGE,             "f" },
285   { "view-text",        OP_ATTACH_VIEW_TEXT,            "T" },
286   { "view-attach",      OP_VIEW_ATTACH,                 M_ENTER_S },
287   { "delete-entry",     OP_DELETE,                      "d" },
288   { "undelete-entry",   OP_UNDELETE,                    "u" },
289   { "collapse-parts",   OP_ATTACH_COLLAPSE,             "v" },
290
291   { "check-traditional-pgp",    OP_CHECK_TRADITIONAL,           "\033P"   },
292   { "extract-keys",             OP_EXTRACT_KEYS,                "\013" },
293   { "forget-passphrase",        OP_FORGET_PASSPHRASE,           "\006" },
294
295   { NULL,               0,                              NULL }
296 };
297
298 struct binding_t OpCompose[] = { /* map: compose */
299   { "attach-file",      OP_COMPOSE_ATTACH_FILE,         "a" },
300   { "attach-message",   OP_COMPOSE_ATTACH_MESSAGE,      "A" },
301   { "edit-bcc",         OP_COMPOSE_EDIT_BCC,            "b" },
302   { "edit-cc",          OP_COMPOSE_EDIT_CC,             "c" },
303   { "copy-file",        OP_SAVE,                        "C" },
304   { "detach-file",      OP_DELETE,                      "D" },
305   { "toggle-disposition",OP_COMPOSE_TOGGLE_DISPOSITION, "\004" },
306   { "edit-description", OP_COMPOSE_EDIT_DESCRIPTION,    "d" },
307   { "edit-message",     OP_COMPOSE_EDIT_MESSAGE,        "e" },
308   { "edit-headers",     OP_COMPOSE_EDIT_HEADERS,        "E" },
309   { "edit-file",        OP_COMPOSE_EDIT_FILE,           "\030e" },
310   { "edit-encoding",    OP_COMPOSE_EDIT_ENCODING,       "\005" },
311   { "edit-from",        OP_COMPOSE_EDIT_FROM,           "\033f" },
312   { "edit-fcc",         OP_COMPOSE_EDIT_FCC,            "f" },
313   { "filter-entry",     OP_FILTER,                      "F" },
314   { "get-attachment",   OP_COMPOSE_GET_ATTACHMENT,      "G" },
315   { "display-toggle-weed",      OP_DISPLAY_HEADERS,             "h" },
316   { "ispell",           OP_COMPOSE_ISPELL,              "i" },
317   { "print-entry",      OP_PRINT,                       "l" },
318   { "edit-mime",        OP_COMPOSE_EDIT_MIME,           "m" },
319   { "new-mime",         OP_COMPOSE_NEW_MIME,            "n" },
320   { "postpone-message", OP_COMPOSE_POSTPONE_MESSAGE,    "P" },
321   { "edit-reply-to",    OP_COMPOSE_EDIT_REPLY_TO,       "r" },
322   { "rename-file",      OP_COMPOSE_RENAME_FILE,         "R" },
323   { "edit-subject",     OP_COMPOSE_EDIT_SUBJECT,        "s" },
324   { "edit-to",          OP_COMPOSE_EDIT_TO,             "t" },
325   { "edit-type",        OP_EDIT_TYPE,                   "\024" },
326   { "write-fcc",        OP_COMPOSE_WRITE_MESSAGE,       "w" },
327   { "toggle-unlink",    OP_COMPOSE_TOGGLE_UNLINK,       "u" },
328   { "toggle-recode",    OP_COMPOSE_TOGGLE_RECODE,       NULL },
329   { "update-encoding",  OP_COMPOSE_UPDATE_ENCODING,     "U" },
330   { "view-attach",      OP_VIEW_ATTACH,                 M_ENTER_S },
331   { "send-message",     OP_COMPOSE_SEND_MESSAGE,        "y" },
332   { "pipe-entry",       OP_PIPE,                        "|" },
333
334   { "attach-key",       OP_COMPOSE_ATTACH_KEY,          "\033k" },
335   { "pgp-menu",         OP_COMPOSE_PGP_MENU,            "p"     },
336
337   { "forget-passphrase",OP_FORGET_PASSPHRASE,           "\006"  },
338
339   { "smime-menu",       OP_COMPOSE_SMIME_MENU,          "S"     },
340
341 #ifdef MIXMASTER
342   { "mix",              OP_COMPOSE_MIX,                 "M" },
343 #endif
344   
345   { NULL,               0,                              NULL }
346 };
347
348 struct binding_t OpPost[] = { /* map: postpone */
349   { "delete-entry",     OP_DELETE,      "d" },
350   { "undelete-entry",   OP_UNDELETE,    "u" },
351   { NULL,               0,              NULL }
352 };
353
354 struct binding_t OpAlias[] = { /* map: alias */
355   { "delete-entry",     OP_DELETE,      "d" },
356   { "undelete-entry",   OP_UNDELETE,    "u" },
357   { NULL,               0,              NULL }
358 };
359   
360
361 /* The file browser */
362 struct binding_t OpBrowser[] = { /* map: browser */
363   { "change-dir",       OP_CHANGE_DIRECTORY,    "c" },
364   { "display-filename", OP_BROWSER_TELL,        "@" },
365   { "enter-mask",       OP_ENTER_MASK,          "m" },
366   { "sort",             OP_SORT,                "o" },
367   { "sort-reverse",     OP_SORT_REVERSE,        "O" },
368   { "select-new",       OP_BROWSER_NEW_FILE,    "N" },
369   { "check-new",        OP_CHECK_NEW,           NULL },
370   { "toggle-mailboxes", OP_TOGGLE_MAILBOXES,    "\t" },
371   { "view-file",        OP_BROWSER_VIEW_FILE,   " " },
372   { "buffy-list",       OP_BUFFY_LIST,          "." },
373 #ifdef USE_IMAP
374   { "create-mailbox",   OP_CREATE_MAILBOX,      "C" },
375   { "delete-mailbox",   OP_DELETE_MAILBOX,      "d" },
376   { "rename-mailbox",   OP_RENAME_MAILBOX,      "r" },
377   { "subscribe",        OP_BROWSER_SUBSCRIBE,   "s" },
378   { "unsubscribe",      OP_BROWSER_UNSUBSCRIBE, "u" },
379   { "toggle-subscribed", OP_BROWSER_TOGGLE_LSUB, "T" },
380 #endif
381   { NULL,               0,                      NULL }
382 };
383
384 /* External Query Menu */
385 struct binding_t OpQuery[] = { /* map: query */
386   { "create-alias",     OP_CREATE_ALIAS,        "a" },
387   { "mail",             OP_MAIL,                "m" },
388   { "query",            OP_QUERY,               "Q" },
389   { "query-append",     OP_QUERY_APPEND,        "A" },
390   { NULL,               0,                      NULL }
391 };
392
393 struct binding_t OpEditor[] = { /* map: editor */
394   { "bol",              OP_EDITOR_BOL,                  "\001" },
395   { "backward-char",    OP_EDITOR_BACKWARD_CHAR,        "\002" },
396   { "backward-word",    OP_EDITOR_BACKWARD_WORD,        "\033b"},
397   { "capitalize-word",  OP_EDITOR_CAPITALIZE_WORD,      "\033c"},
398   { "downcase-word",    OP_EDITOR_DOWNCASE_WORD,        "\033l"},
399   { "upcase-word",      OP_EDITOR_UPCASE_WORD,          "\033u"},
400   { "delete-char",      OP_EDITOR_DELETE_CHAR,          "\004" },
401   { "eol",              OP_EDITOR_EOL,                  "\005" },
402   { "forward-char",     OP_EDITOR_FORWARD_CHAR,         "\006" },
403   { "forward-word",     OP_EDITOR_FORWARD_WORD,         "\033f"},
404   { "backspace",        OP_EDITOR_BACKSPACE,            "\010" },
405   { "kill-eol",         OP_EDITOR_KILL_EOL,             "\013" },
406   { "kill-eow",         OP_EDITOR_KILL_EOW,             "\033d"},
407   { "kill-line",        OP_EDITOR_KILL_LINE,            "\025" },
408   { "quote-char",       OP_EDITOR_QUOTE_CHAR,           "\026" },
409   { "kill-word",        OP_EDITOR_KILL_WORD,            "\027" },
410   { "complete",         OP_EDITOR_COMPLETE,             "\t"   },
411   { "complete-query",   OP_EDITOR_COMPLETE_QUERY,       "\024" },
412   { "buffy-cycle",      OP_EDITOR_BUFFY_CYCLE,          " "    },
413   { "history-up",       OP_EDITOR_HISTORY_UP,           NULL   },
414   { "history-down",     OP_EDITOR_HISTORY_DOWN,         NULL   },
415   { "transpose-chars",  OP_EDITOR_TRANSPOSE_CHARS,      NULL   },
416   { NULL,               0,                              NULL   }
417 };
418
419
420
421 struct binding_t OpPgp[] = { /* map: pgp */
422   { "verify-key",       OP_VERIFY_KEY,          "c" },
423   { "view-name",        OP_VIEW_ID,             "%" },
424   { NULL,               0,                              NULL }
425 };
426
427
428
429 /* When using the GPGME based backend we have some useful functions
430    for the SMIME menu.  */
431 struct binding_t OpSmime[] = { /* map: smime */
432 #ifdef CRYPT_BACKEND_GPGME
433   { "verify-key",    OP_VERIFY_KEY,             "c" },
434   { "view-name",     OP_VIEW_ID,                "%" },
435 #endif
436   { NULL,       0,      NULL }
437 };
438
439
440
441 #ifdef MIXMASTER
442 struct binding_t OpMix[] = { /* map: mix */
443   { "accept",           OP_MIX_USE,     M_ENTER_S },
444   { "append",           OP_MIX_APPEND,  "a"       },
445   { "insert",           OP_MIX_INSERT,  "i"       },
446   { "delete",           OP_MIX_DELETE,  "d"       },
447   { "chain-prev",       OP_MIX_CHAIN_PREV, "<left>" },
448   { "chain-next",       OP_MIX_CHAIN_NEXT, "<right>" },
449   { NULL,               0,              NULL }
450 };
451 #endif /* MIXMASTER */