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

muttrc and functions



In my .muttrc, I have a rather long list of lines in triples that say
(were it in mixed mutt-ish and C-ish syntax)

    if(some condition) {
        set signature ...
        my_hdr From: ...
        fcc-save-hook ...
    }

The inside block is the same each time, only the condition changes.

This repeats for many, many such conditions.  Of course, it's all in
normal mutt notation:

    send-hook condition "set signature ..."
    send-hook condition "my_hdr From: ..."
    fcc-save-hook condition ...

Now, being a programmer, I'd like to be able to define a function and
then just have one line for each:

    condition1 do-function
    condition2 do-function
    condition3 do-function
    ...

Is anything of the sort possible in mutt config?  Seems no, but
thought I'd ask.  It would make a few hundred lines of my mutt config
easier to read at a glance.

Thanks much.

-- 
 Jeff

 Jeff Abrahamson  <http://www.purple.com/jeff/>
 GPG fingerprint: 1A1A BA95 D082 A558 A276  63C6 16BF 8C4C 0D1D AE4B

Attachment: signature.asc
Description: Digital signature