From: Alain Bench Date: Sun, 4 Mar 2007 18:26:29 +0000 (+0100) Subject: Doc fixes and updates concerning hooks X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ecbf9d84a3e323a678cc4d92484e15bc3bc1d7ce;p=neomutt Doc fixes and updates concerning hooks - Add reply-hooks and send2-hooks in lists they miss. - Fix that they all take full patterns, not only regexps. - Note interaction with $default_hook. - Enumerate them in execution order/increasing priority. - Add iconv-hook, remove a duplicate charset-hook. --- diff --git a/doc/manual.xml.head b/doc/manual.xml.head index cba32e483..8e9624c60 100644 --- a/doc/manual.xml.head +++ b/doc/manual.xml.head @@ -4026,8 +4026,9 @@ send-hook ~C'^b@b\.b$' my_hdr from: c@c.c Message Matching in Hooks -Hooks that act upon messages (send-hook, save-hook, fcc-hook, -message-hook) are evaluated in a slightly different manner. For the other +Hooks that act upon messages (message-hook, reply-hook, +send-hook, send2-hook, save-hook, fcc-hook) are evaluated in a +slightly different manner. For the other types of hooks, a regular expression is sufficient. But in dealing with messages a finer grain of control is needed for matching since for different purposes you want to match @@ -5987,6 +5988,12 @@ The following are the commands understood by mutt. + +iconv-hook charset local-charset + + + + color object foreground background [ regexp ] @@ -6035,12 +6042,6 @@ The following are the commands understood by mutt. - -charset-hook charset local-charset - - - - ignore pattern [ pattern ... ] @@ -6162,13 +6163,19 @@ The following are the commands understood by mutt. -send-hook regexp command +reply-hook pattern command + + + + + +send-hook pattern command -reply-hook regexp command +send2-hook pattern command diff --git a/init.h b/init.h index b940b32ab..ce5ff7818 100644 --- a/init.h +++ b/init.h @@ -486,8 +486,8 @@ struct option_t MuttVars[] = { { "default_hook", DT_STR, R_NONE, UL &DefaultHook, UL "~f %s !~P | (~P ~C %s)" }, /* ** .pp - ** This variable controls how send-hooks, message-hooks, save-hooks, - ** and fcc-hooks will + ** This variable controls how message-hooks, reply-hooks, send-hooks, + ** send2-hooks, save-hooks, and fcc-hooks will ** be interpreted if they are specified with only a simple regexp, ** instead of a matching pattern. The hooks are expanded when they are ** declared, so a hook will be interpreted according to the value of this