/*
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or (at
 *  your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful, but
 *  WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 *  General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
 *  MA 02110-1301, USA.
 *
 *  Copyright © 2006 Pierre Habouzit
 */

/*
 * Copyright notice from original mutt:
 * Copyright (C) 1996-2000 Michael R. Elkins <me@mutt.org>
 *
 * This file is part of mutt-ng, see http://www.muttng.org/.
 * It's licensed under the GNU General Public License, 
 * please see the file GPL in the top level source directory.
 */

/*
 * This file contains the structures needed to parse ``bind'' commands, as
 * well as the default bindings for each menu.
 *
 * Notes:
 *
 * - If you need to bind a control char, use the octal value because the \cX
 * construct does not work at this level.
 *
 */

#if defined(MUTT_FUNCTIONS_PROTO)
#  define LIST(name)     extern struct binding_t name[]
#  define ITEM(a, b, c)
#  define ENDLIST        ;
#elif defined (MUTT_FUNCTIONS_VALUES)
#  define LIST(name)     struct binding_t name[] = {
#  define ITEM(a, b, c)  {a, b, c},
#  define ENDLIST        {NULL, -1, NULL}};
#else
#  error neither MUTT_FUNCTIONS_PROTO nor MUTT_FUNCTIONS_VALUES is defined
#endif

LIST(OpGeneric)
    ITEM("top-page",         OP_TOP_PAGE,             "H")
    ITEM("next-entry",       OP_NEXT_ENTRY,           "j")
    ITEM("previous-entry",   OP_PREV_ENTRY,           "k")
    ITEM("bottom-page",      OP_BOTTOM_PAGE,          "L")
    ITEM("refresh",          OP_REDRAW,               "\014")
    ITEM("middle-page",      OP_MIDDLE_PAGE,          "M")
    ITEM("search-next",      OP_SEARCH_NEXT,          "n")
    ITEM("exit",             OP_EXIT,                 "q")
    ITEM("tag-entry",        OP_TAG,                  "t")
    ITEM("next-page",        OP_NEXT_PAGE,            "z")
    ITEM("previous-page",    OP_PREV_PAGE,            "Z")
    ITEM("last-entry",       OP_LAST_ENTRY,           "*")
    ITEM("first-entry",      OP_FIRST_ENTRY,          "=")
    ITEM("enter-command",    OP_ENTER_COMMAND,        ":")
    ITEM("next-line",        OP_NEXT_LINE,            ">")
    ITEM("previous-line",    OP_PREV_LINE,            "<")
    ITEM("half-up",          OP_HALF_UP,              "[")
    ITEM("half-down",        OP_HALF_DOWN,            "]")
    ITEM("help",             OP_HELP,                 "?")
    ITEM("tag-prefix",       OP_TAG_PREFIX,           ";")
    ITEM("tag-prefix-cond",  OP_TAG_PREFIX_COND,      NULL)
    ITEM("end-cond",         OP_END_COND,             NULL)
    ITEM("shell-escape",     OP_SHELL_ESCAPE,         "!")
    ITEM("select-entry",     OP_GENERIC_SELECT_ENTRY, "\n")
    ITEM("search",           OP_SEARCH,               "/")
    ITEM("search-reverse",   OP_SEARCH_REVERSE,       "\033/")
    ITEM("search-opposite",  OP_SEARCH_OPPOSITE,      NULL)
    ITEM("jump",             OP_JUMP,                 NULL)
    ITEM("current-top",      OP_CURRENT_TOP,          NULL)
    ITEM("current-middle",   OP_CURRENT_MIDDLE,       NULL)
    ITEM("current-bottom",   OP_CURRENT_BOTTOM,       NULL)
ENDLIST

LIST(OpMain)
    ITEM("create-alias",              OP_CREATE_ALIAS,               "a")
    ITEM("bounce-message",            OP_BOUNCE_MESSAGE,             "b")
    ITEM("break-thread",              OP_MAIN_BREAK_THREAD,          "#")
    ITEM("change-folder",             OP_MAIN_CHANGE_FOLDER,         "c")
    ITEM("change-folder-readonly",    OP_MAIN_CHANGE_FOLDER_READONLY,"\033c")
    ITEM("collapse-thread",           OP_MAIN_COLLAPSE_THREAD,       "\033v")
    ITEM("collapse-all",              OP_MAIN_COLLAPSE_ALL,          "\033V")
    ITEM("copy-message",              OP_COPY_MESSAGE,               "C")
    ITEM("decode-copy",               OP_DECODE_COPY,                "\033C")
    ITEM("decode-save",               OP_DECODE_SAVE,                "\033s")
    ITEM("delete-message",            OP_DELETE,                     "d")
    ITEM("delete-pattern",            OP_MAIN_DELETE_PATTERN,        "D")
    ITEM("delete-thread",             OP_DELETE_THREAD,              "\004")
    ITEM("delete-subthread",          OP_DELETE_SUBTHREAD,           "\033d")
    ITEM("edit",                      OP_EDIT_MESSAGE,               "e")
    ITEM("edit-type",                 OP_EDIT_TYPE,                  "\005")
    ITEM("forward-message",           OP_FORWARD_MESSAGE,            "f")
    ITEM("flag-message",              OP_FLAG_MESSAGE,               "\033f")
    ITEM("group-reply",               OP_GROUP_REPLY,                "g")
    ITEM("fetch-mail",                OP_MAIN_FETCH_MAIL,            "G")
    ITEM("imap-fetch-mail",           OP_MAIN_IMAP_FETCH,            NULL)
    ITEM("display-toggle-weed",       OP_DISPLAY_HEADERS,            "h")
    ITEM("next-undeleted",            OP_MAIN_NEXT_UNDELETED,        "j")
    ITEM("previous-undeleted",        OP_MAIN_PREV_UNDELETED,        "k")
    ITEM("limit",                     OP_MAIN_LIMIT,                 "l")
    ITEM("link-threads",              OP_MAIN_LINK_THREADS,          "&")
    ITEM("list-reply",                OP_LIST_REPLY,                 "L")
    ITEM("mail",                      OP_MAIL,                       "m")
    ITEM("toggle-new",                OP_TOGGLE_NEW,                 "N")
    ITEM("toggle-write",              OP_TOGGLE_WRITE,               "%")
    ITEM("next-thread",               OP_MAIN_NEXT_THREAD,           "\016")
    ITEM("next-subthread",            OP_MAIN_NEXT_SUBTHREAD,        "\033n")
    ITEM("purge-message",             OP_PURGE_MESSAGE,              NULL)
    ITEM("query",                     OP_QUERY,                      "Q")
    ITEM("quit",                      OP_QUIT,                       "q")
    ITEM("reply",                     OP_REPLY,                      "r")
    ITEM("show-limit",                OP_MAIN_SHOW_LIMIT,            "\033l")
    ITEM("sort-mailbox",              OP_SORT,                       "o")
    ITEM("sort-reverse",              OP_SORT_REVERSE,               "O")
    ITEM("print-message",             OP_PRINT,                      "p")
    ITEM("previous-thread",           OP_MAIN_PREV_THREAD,           "\020")
    ITEM("previous-subthread",        OP_MAIN_PREV_SUBTHREAD,        "\033p")
    ITEM("recall-message",            OP_RECALL_MESSAGE,             "R")
    ITEM("read-thread",               OP_MAIN_READ_THREAD,           "\022")
    ITEM("read-subthread",            OP_MAIN_READ_SUBTHREAD,        "\033r")
    ITEM("resend-message",            OP_RESEND,                     "\033e")
    ITEM("save-message",              OP_SAVE,                       "s")
    ITEM("tag-pattern",               OP_MAIN_TAG_PATTERN,           "T")
    ITEM("tag-subthread",             OP_TAG_SUBTHREAD,              NULL)
    ITEM("tag-thread",                OP_TAG_THREAD,                 "\033t")
    ITEM("untag-pattern",             OP_MAIN_UNTAG_PATTERN,         "\024")
    ITEM("undelete-message",          OP_UNDELETE,                   "u")
    ITEM("undelete-pattern",          OP_MAIN_UNDELETE_PATTERN,      "U")
    ITEM("undelete-subthread",        OP_UNDELETE_SUBTHREAD,         "\033u")
    ITEM("undelete-thread",           OP_UNDELETE_THREAD,            "\025")
    ITEM("view-attachments",          OP_VIEW_ATTACHMENTS,           "v")
    ITEM("set-flag",                  OP_MAIN_SET_FLAG,              "w")
    ITEM("clear-flag",                OP_MAIN_CLEAR_FLAG,            "W")
    ITEM("toggle-read",               OP_TOGGLE_READ,                "X")
    ITEM("display-message",           OP_DISPLAY_MESSAGE,            "\n")
    ITEM("buffy-list",                OP_BUFFY_LIST,                 ".")
    ITEM("sync-mailbox",              OP_MAIN_SYNC_FOLDER,           "$")
    ITEM("display-address",           OP_DISPLAY_ADDRESS,            "@")
    ITEM("pipe-message",              OP_PIPE,                       "|")
    ITEM("next-new",                  OP_MAIN_NEXT_NEW,              NULL)
    ITEM("next-new-then-unread",      OP_MAIN_NEXT_NEW_THEN_UNREAD,  "\t")
    ITEM("previous-new",              OP_MAIN_PREV_NEW,              NULL)
    ITEM("previous-new-then-unread",  OP_MAIN_PREV_NEW_THEN_UNREAD,  "\033\t")
    ITEM("next-unread",               OP_MAIN_NEXT_UNREAD,           NULL)
    ITEM("previous-unread",           OP_MAIN_PREV_UNREAD,           NULL)
    ITEM("parent-message",            OP_MAIN_PARENT_MESSAGE,        NULL)


    ITEM("extract-keys",              OP_EXTRACT_KEYS,               "\013")
    ITEM("check-traditional-pgp",     OP_CHECK_TRADITIONAL,          "\033P")
    ITEM("mail-key",                  OP_MAIL_KEY,                   "\033k")
    ITEM("decrypt-copy",              OP_DECRYPT_COPY,               NULL)
    ITEM("decrypt-save",              OP_DECRYPT_SAVE,               NULL)


    ITEM("sidebar-scroll-up",         OP_SIDEBAR_SCROLL_UP,          NULL)
    ITEM("sidebar-scroll-down",       OP_SIDEBAR_SCROLL_DOWN,        NULL)
    ITEM("sidebar-next",              OP_SIDEBAR_NEXT,               NULL)
    ITEM("sidebar-prev",              OP_SIDEBAR_PREV,               NULL)
    ITEM("sidebar-next-new",          OP_SIDEBAR_NEXT_NEW,           NULL)
    ITEM("sidebar-prev-new",          OP_SIDEBAR_PREV_NEW,           NULL)
    ITEM("sidebar-open",              OP_SIDEBAR_OPEN,               NULL)
ENDLIST

LIST(OpPager)
    ITEM("break-thread",              OP_MAIN_BREAK_THREAD,           "#")
    ITEM("create-alias",              OP_CREATE_ALIAS,                "a")
    ITEM("bounce-message",            OP_BOUNCE_MESSAGE,              "b")
    ITEM("change-folder",             OP_MAIN_CHANGE_FOLDER,          "c")
    ITEM("change-folder-readonly",    OP_MAIN_CHANGE_FOLDER_READONLY, "\033c")
    ITEM("copy-message",              OP_COPY_MESSAGE,                "C")
    ITEM("decode-copy",               OP_DECODE_COPY,                 "\033C")
    ITEM("delete-message",            OP_DELETE,                      "d")
    ITEM("delete-thread",             OP_DELETE_THREAD,               "\004")
    ITEM("delete-subthread",          OP_DELETE_SUBTHREAD,            "\033d")
    ITEM("edit",                      OP_EDIT_MESSAGE,                "e")
    ITEM("edit-type",                 OP_EDIT_TYPE,                   "\005")
    ITEM("forward-message",           OP_FORWARD_MESSAGE,             "f")
    ITEM("flag-message",              OP_FLAG_MESSAGE,                "\033f")
    ITEM("group-reply",               OP_GROUP_REPLY,                 "g")
    ITEM("imap-fetch-mail",           OP_MAIN_IMAP_FETCH,             NULL)
    ITEM("display-toggle-weed",       OP_DISPLAY_HEADERS,             "h")
    ITEM("next-undeleted",            OP_MAIN_NEXT_UNDELETED,         "j")
    ITEM("next-entry",                OP_NEXT_ENTRY,                  "J")
    ITEM("previous-undeleted",        OP_MAIN_PREV_UNDELETED,         "k")
    ITEM("previous-entry",            OP_PREV_ENTRY,                  "K")
    ITEM("link-threads",              OP_MAIN_LINK_THREADS,           "&")
    ITEM("list-reply",                OP_LIST_REPLY,                  "L")
    ITEM("redraw-screen",             OP_REDRAW,                      "\014")
    ITEM("mail",                      OP_MAIL,                        "m")
    ITEM("mark-as-new",               OP_TOGGLE_NEW,                  "N")
    ITEM("search-next",               OP_SEARCH_NEXT,                 "n")
    ITEM("next-thread",               OP_MAIN_NEXT_THREAD,            "\016")
    ITEM("next-subthread",            OP_MAIN_NEXT_SUBTHREAD,         "\033n")
    ITEM("print-message",             OP_PRINT,                       "p")
    ITEM("previous-thread",           OP_MAIN_PREV_THREAD,            "\020")
    ITEM("previous-subthread",        OP_MAIN_PREV_SUBTHREAD,         "\033p")
    ITEM("purge-message",             OP_PURGE_MESSAGE,               NULL)
    ITEM("quit",                      OP_QUIT,                        "Q")
    ITEM("exit",                      OP_EXIT,                        "q")
    ITEM("reply",                     OP_REPLY,                       "r")
    ITEM("recall-message",            OP_RECALL_MESSAGE,              "R")
    ITEM("read-thread",               OP_MAIN_READ_THREAD,            "\022")
    ITEM("read-subthread",            OP_MAIN_READ_SUBTHREAD,         "\033r")
    ITEM("resend-message",            OP_RESEND,                      "\033e")
    ITEM("save-message",              OP_SAVE,                        "s")
    ITEM("skip-quoted",               OP_PAGER_SKIP_QUOTED,           "S")
    ITEM("decode-save",               OP_DECODE_SAVE,                 "\033s")
    ITEM("tag-message",               OP_TAG,                         "t")
    ITEM("toggle-quoted",             OP_PAGER_HIDE_QUOTED,           "T")
    ITEM("undelete-message",          OP_UNDELETE,                    "u")
    ITEM("undelete-subthread",        OP_UNDELETE_SUBTHREAD,          "\033u")
    ITEM("undelete-thread",           OP_UNDELETE_THREAD,             "\025")
    ITEM("view-attachments",          OP_VIEW_ATTACHMENTS,            "v")
    ITEM("search-toggle",             OP_SEARCH_TOGGLE,               "\\")
    ITEM("display-address",           OP_DISPLAY_ADDRESS,             "@")
    ITEM("next-new",                  OP_MAIN_NEXT_NEW,               NULL)
    ITEM("next-new-then-unread",      OP_MAIN_NEXT_NEW_THEN_UNREAD,   "\t")
    ITEM("pipe-message",              OP_PIPE,                        "|")
    ITEM("help",                      OP_HELP,                        "?")
    ITEM("next-page",                 OP_NEXT_PAGE,                   " ")
    ITEM("previous-page",             OP_PREV_PAGE,                   "-")
    ITEM("top",                       OP_PAGER_TOP,                   "^")
    ITEM("sync-mailbox",              OP_MAIN_SYNC_FOLDER,            "$")
    ITEM("shell-escape",              OP_SHELL_ESCAPE,                "!")
    ITEM("enter-command",             OP_ENTER_COMMAND,               ":")
    ITEM("buffy-list",                OP_BUFFY_LIST,                  ".")
    ITEM("search",                    OP_SEARCH,                      "/")
    ITEM("search-reverse",            OP_SEARCH_REVERSE,              "\033/")
    ITEM("search-opposite",           OP_SEARCH_OPPOSITE,             NULL)
    ITEM("next-line",                 OP_NEXT_LINE,                   "\n")
    ITEM("jump",                      OP_JUMP,                        NULL)
    ITEM("next-unread",               OP_MAIN_NEXT_UNREAD,            NULL)
    ITEM("previous-new",              OP_MAIN_PREV_NEW,               NULL)
    ITEM("previous-new-then-unread",  OP_MAIN_PREV_NEW_THEN_UNREAD,   NULL)
    ITEM("previous-unread",           OP_MAIN_PREV_UNREAD,            NULL)
    ITEM("half-up",                   OP_HALF_UP,                     NULL)
    ITEM("half-down",                 OP_HALF_DOWN,                   NULL)
    ITEM("previous-line",             OP_PREV_LINE,                   NULL)
    ITEM("bottom",                    OP_PAGER_BOTTOM,                NULL)
    ITEM("parent-message",            OP_MAIN_PARENT_MESSAGE,         NULL)

    ITEM("check-traditional-pgp",     OP_CHECK_TRADITIONAL,           "\033P")
    ITEM("mail-key",                  OP_MAIL_KEY,                    "\033k")
    ITEM("extract-keys",              OP_EXTRACT_KEYS,                "\013")
    ITEM("decrypt-copy",              OP_DECRYPT_COPY,                NULL)
    ITEM("decrypt-save",              OP_DECRYPT_SAVE,                NULL)

    ITEM("sidebar-scroll-up",         OP_SIDEBAR_SCROLL_UP,           NULL)
    ITEM("sidebar-scroll-down",       OP_SIDEBAR_SCROLL_DOWN,         NULL)
    ITEM("sidebar-next",              OP_SIDEBAR_NEXT,                NULL)
    ITEM("sidebar-prev",              OP_SIDEBAR_PREV,                NULL)
    ITEM("sidebar-next-new",          OP_SIDEBAR_NEXT_NEW,            NULL)
    ITEM("sidebar-prev-new",          OP_SIDEBAR_PREV_NEW,            NULL)
    ITEM("sidebar-open",              OP_SIDEBAR_OPEN,                NULL)
ENDLIST

LIST(OpAttach)
    ITEM("bounce-message",           OP_BOUNCE_MESSAGE,           "b")
    ITEM("display-toggle-weed",      OP_DISPLAY_HEADERS,          "h")
    ITEM("edit-type",                OP_EDIT_TYPE,                "\005")
    ITEM("print-entry",              OP_PRINT,                    "p")
    ITEM("save-entry",               OP_SAVE,                     "s")
    ITEM("pipe-entry",               OP_PIPE,                     "|")
    ITEM("view-mailcap",             OP_ATTACH_VIEW_MAILCAP,      "m")
    ITEM("reply",                    OP_REPLY,                    "r")
    ITEM("resend-message",           OP_RESEND,                   "\033e")
    ITEM("group-reply",              OP_GROUP_REPLY,              "g")
    ITEM("list-reply",               OP_LIST_REPLY,               "L")
    ITEM("forward-message",          OP_FORWARD_MESSAGE,          "f")
    ITEM("view-text",                OP_ATTACH_VIEW_TEXT,         "T")
    ITEM("view-attach",              OP_VIEW_ATTACH,              "\n")
    ITEM("delete-entry",             OP_DELETE,                   "d")
    ITEM("undelete-entry",           OP_UNDELETE,                 "u")
    ITEM("collapse-parts",           OP_ATTACH_COLLAPSE,          "v")

    ITEM("check-traditional-pgp",    OP_CHECK_TRADITIONAL,        "\033P")
    ITEM("extract-keys",             OP_EXTRACT_KEYS,             "\013")
ENDLIST

LIST(OpCompose)
    ITEM("attach-file",              OP_COMPOSE_ATTACH_FILE,         "a")
    ITEM("attach-message",           OP_COMPOSE_ATTACH_MESSAGE,      "A")
    ITEM("edit-bcc",                 OP_COMPOSE_EDIT_BCC,            "b")
    ITEM("edit-cc",                  OP_COMPOSE_EDIT_CC,             "c")
    ITEM("copy-file",                OP_SAVE,                        "C")
    ITEM("detach-file",              OP_DELETE,                      "D")
    ITEM("toggle-disposition",       OP_COMPOSE_TOGGLE_DISPOSITION,  "\004")
    ITEM("edit-description",         OP_COMPOSE_EDIT_DESCRIPTION,    "d")
    ITEM("edit-message",             OP_COMPOSE_EDIT_MESSAGE,        "e")
    ITEM("edit-headers",             OP_COMPOSE_EDIT_HEADERS,        "E")
    ITEM("edit-file",                OP_COMPOSE_EDIT_FILE,           "\030e")
    ITEM("edit-encoding",            OP_COMPOSE_EDIT_ENCODING,       "\005")
    ITEM("edit-from",                OP_COMPOSE_EDIT_FROM,           "\033f")
    ITEM("edit-fcc",                 OP_COMPOSE_EDIT_FCC,            "f")
    ITEM("filter-entry",             OP_FILTER,                      "F")
    ITEM("get-attachment",           OP_COMPOSE_GET_ATTACHMENT,      "G")
    ITEM("display-toggle-weed",      OP_DISPLAY_HEADERS,             "h")
    ITEM("print-entry",              OP_PRINT,                       "l")
    ITEM("edit-mime",                OP_COMPOSE_EDIT_MIME,           "m")
    ITEM("new-mime",                 OP_COMPOSE_NEW_MIME,            "n")
    ITEM("postpone-message",         OP_COMPOSE_POSTPONE_MESSAGE,    "P")
    ITEM("edit-reply-to",            OP_COMPOSE_EDIT_REPLY_TO,       "r")
    ITEM("rename-file",              OP_COMPOSE_RENAME_FILE,         "R")
    ITEM("edit-subject",             OP_COMPOSE_EDIT_SUBJECT,        "s")
    ITEM("edit-to",                  OP_COMPOSE_EDIT_TO,             "t")
    ITEM("edit-type",                OP_EDIT_TYPE,                   "\024")
    ITEM("write-fcc",                OP_COMPOSE_WRITE_MESSAGE,       "w")
    ITEM("toggle-unlink",            OP_COMPOSE_TOGGLE_UNLINK,       "u")
    ITEM("toggle-recode",            OP_COMPOSE_TOGGLE_RECODE,       NULL)
    ITEM("update-encoding",          OP_COMPOSE_UPDATE_ENCODING,     "U")
    ITEM("view-attach",              OP_VIEW_ATTACH,                 "\n")
    ITEM("send-message",             OP_COMPOSE_SEND_MESSAGE,        "y")
    ITEM("pipe-entry",               OP_PIPE,                        "|")
    ITEM("pgp-menu",                 OP_COMPOSE_PGP_MENU,            "p")
    ITEM("smime-menu",               OP_COMPOSE_SMIME_MENU,          "S")
ENDLIST

LIST(OpPost)
    ITEM("delete-entry",             OP_DELETE,                      "d")
    ITEM("undelete-entry",           OP_UNDELETE,                    "u")
ENDLIST

LIST(OpAlias)
    ITEM("delete-entry",             OP_DELETE,                      "d")
    ITEM("undelete-entry",           OP_UNDELETE,                    "u")
ENDLIST

/* The file browser */
LIST(OpBrowser)
    ITEM("change-dir",               OP_CHANGE_DIRECTORY,            "c")
    ITEM("display-filename",         OP_BROWSER_TELL,                "@")
    ITEM("enter-mask",               OP_ENTER_MASK,                  "m")
    ITEM("sort",                     OP_SORT,                        "o")
    ITEM("sort-reverse",             OP_SORT_REVERSE,                "O")
    ITEM("select-new",               OP_BROWSER_NEW_FILE,            "N")
    ITEM("check-new",                OP_CHECK_NEW,                   NULL)
    ITEM("toggle-mailboxes",         OP_TOGGLE_MAILBOXES,            "\t")
    ITEM("view-file",                OP_BROWSER_VIEW_FILE,           " ")
    ITEM("buffy-list",               OP_BUFFY_LIST,                  ".")
    ITEM("create-mailbox",           OP_CREATE_MAILBOX,              "C")
    ITEM("delete-mailbox",           OP_DELETE_MAILBOX,              "d")
    ITEM("rename-mailbox",           OP_RENAME_MAILBOX,              "r")
    ITEM("subscribe",                OP_BROWSER_SUBSCRIBE,           "s")
    ITEM("unsubscribe",              OP_BROWSER_UNSUBSCRIBE,         "u")
    ITEM("toggle-subscribed",        OP_BROWSER_TOGGLE_LSUB,         "T")
ENDLIST

/* External Query Menu */
LIST(OpQuery)
    ITEM("create-alias",             OP_CREATE_ALIAS,                "a")
    ITEM("mail",                     OP_MAIL,                        "m")
    ITEM("query",                    OP_QUERY,                       "Q")
    ITEM("query-append",             OP_QUERY_APPEND,                "A")
ENDLIST

LIST(OpEditor)
    ITEM("bol",                      OP_EDITOR_BOL,                  "\001")
    ITEM("backward-char",            OP_EDITOR_BACKWARD_CHAR,        "\002")
    ITEM("backward-word",            OP_EDITOR_BACKWARD_WORD,        "\033b")
    ITEM("capitalize-word",          OP_EDITOR_CAPITALIZE_WORD,      "\033c")
    ITEM("downcase-word",            OP_EDITOR_DOWNCASE_WORD,        "\033l")
    ITEM("upcase-word",              OP_EDITOR_UPCASE_WORD,          "\033u")
    ITEM("delete-char",              OP_EDITOR_DELETE_CHAR,          "\004")
    ITEM("eol",                      OP_EDITOR_EOL,                  "\005")
    ITEM("forward-char",             OP_EDITOR_FORWARD_CHAR,         "\006")
    ITEM("forward-word",             OP_EDITOR_FORWARD_WORD,         "\033f")
    ITEM("backspace",                OP_EDITOR_BACKSPACE,            "\010")
    ITEM("kill-eol",                 OP_EDITOR_KILL_EOL,             "\013")
    ITEM("kill-eow",                 OP_EDITOR_KILL_EOW,             "\033d")
    ITEM("kill-line",                OP_EDITOR_KILL_LINE,            "\025")
    ITEM("quote-char",               OP_EDITOR_QUOTE_CHAR,           "\026")
    ITEM("kill-word",                OP_EDITOR_KILL_WORD,            "\027")
    ITEM("complete",                 OP_EDITOR_COMPLETE,             "\t")
    ITEM("complete-query",           OP_EDITOR_COMPLETE_QUERY,       "\024")
    ITEM("buffy-cycle",              OP_EDITOR_BUFFY_CYCLE,          " ")
    ITEM("history-up",               OP_EDITOR_HISTORY_UP,           NULL)
    ITEM("history-down",             OP_EDITOR_HISTORY_DOWN,         NULL)
    ITEM("transpose-chars",          OP_EDITOR_TRANSPOSE_CHARS,      NULL)
ENDLIST

LIST(OpPgp)
    ITEM("verify-key",               OP_VERIFY_KEY,                  "c")
    ITEM("view-name",                OP_VIEW_ID,                     "%")
ENDLIST

/* When using the GPGME based backendwe have some useful functions
   for the SMIME menu.  */
LIST(OpSmime)
#ifdef CRYPT_BACKEND_GPGME
    ITEM("verify-key",               OP_VERIFY_KEY,                  "c")
    ITEM("view-name",                OP_VIEW_ID,                     "%")
#endif
ENDLIST

#undef ENDLIST
#undef ITEM
#undef LIST

#undef MUTT_FUNCTIONS_PROTO
#undef MUTT_FUNCTIONS_VALUES

/* vim:set ft=c: */
