<<< Date Index >>>     <<< Thread Index >>>

[PATCH] Doc fixes and updates concerning hooks



Hi,

Attached Alain's doc_lacking_hooks patch from
Message-ID: <20060722161136.GA10407@xxxxxxx> against tip.

c
# HG changeset patch
# User Alain Bench <veronatif@free.fr>
# Date 1173032789 -3600
# Node ID 82f647c7fbe67e12b05a787ff2a5e1fd1074ce9f
# Parent  08b1fa8cd55eb4d17259f4105081d1a98b2f3e2d
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 -r 08b1fa8cd55e -r 82f647c7fbe6 doc/manual.xml.head
--- a/doc/manual.xml.head	Sat Mar 03 22:09:53 2007 -0800
+++ b/doc/manual.xml.head	Sun Mar 04 19:26:29 2007 +0100
@@ -3952,8 +3952,9 @@ send-hook ~C'^b@b\.b$' my_hdr from: c@c.
 <title>Message Matching in Hooks</title>
 
 <para>
-Hooks that act upon messages (<literal>send-hook, save-hook, fcc-hook,
-message-hook</literal>) are evaluated in a slightly different manner.  For the other
+Hooks that act upon messages (<literal>message-hook, reply-hook,
+send-hook, send2-hook, save-hook, fcc-hook</literal>) are evaluated in a
+slightly different manner. For the other
 types of hooks, a <link linkend="regexp">regular expression</link> is
 sufficient.  But in dealing with messages a finer grain of control is
 needed for matching since for different purposes you want to match
@@ -5914,6 +5915,12 @@ The following are the commands understoo
 <listitem>
 
 <para>
+<literal><link linkend="charset-hook">iconv-hook</link></literal> <emphasis>charset</emphasis> <emphasis>local-charset</emphasis>
+</para>
+</listitem>
+<listitem>
+
+<para>
 <literal><link linkend="color">color</link></literal> <emphasis>object</emphasis> <emphasis>foreground</emphasis> <emphasis>background</emphasis> &lsqb; <emphasis>regexp</emphasis> &rsqb;
 </para>
 </listitem>
@@ -5962,12 +5969,6 @@ The following are the commands understoo
 <listitem>
 
 <para>
-<literal><link linkend="charset-hook">charset-hook</link></literal> <emphasis>charset</emphasis> <emphasis>local-charset</emphasis>
-</para>
-</listitem>
-<listitem>
-
-<para>
 <literal><link linkend="ignore">ignore</link></literal> <emphasis>pattern</emphasis> &lsqb; <emphasis>pattern</emphasis> ... &rsqb;
 </para>
 </listitem>
@@ -6088,13 +6089,19 @@ The following are the commands understoo
 <listitem>
 
 <para>
-<literal><link linkend="send-hook">send-hook</link></literal> <emphasis>regexp</emphasis> <emphasis>command</emphasis>
-</para>
-</listitem>
-<listitem>
-
-<para>
-<literal><link linkend="send-hook">reply-hook</link></literal> <emphasis>regexp</emphasis> <emphasis>command</emphasis>
+<literal><link linkend="send-hook">reply-hook</link></literal> <emphasis>pattern</emphasis> <emphasis>command</emphasis>
+</para>
+</listitem>
+<listitem>
+
+<para>
+<literal><link linkend="send-hook">send-hook</link></literal> <emphasis>pattern</emphasis> <emphasis>command</emphasis>
+</para>
+</listitem>
+<listitem>
+
+<para>
+<literal><link linkend="send-hook">send2-hook</link></literal> <emphasis>pattern</emphasis> <emphasis>command</emphasis>
 </para>
 </listitem>
 <listitem>
diff -r 08b1fa8cd55e -r 82f647c7fbe6 init.h
--- a/init.h	Sat Mar 03 22:09:53 2007 -0800
+++ b/init.h	Sun Mar 04 19:26:29 2007 +0100
@@ -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