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

Re: ^R / ^D and threads



On Wed, Nov 12, 2003 at 02:31:41PM +0000, Edmund GRIMLEY EVANS wrote:

> I hate programming with macros (I prefer functional programming) and I
> don't use Mutt's macros much, but the way you solve this sort of
> problem in macro programming languages (like LaTeX) is to use a macro
> to remember the current state of $resolve. This macro gets redefined
> by every macro that changes $resolve. So you might have a macro
> save-resolve that redefines restore-resolve to invoke either
> set-resolve or clear-resolve, each of which redefines save-resolve as
> appropriate. It's fun to debug, and it's good practice for using
> LaTeX.

I don't know if this was a joke or not, but I sure hope we don't have
to do something like that in order to save and restore variable values
in Mutt.

I'd rather rewrite all my "set resolve=blablabla" statements into
something like `makemuttrc set resolve=blablabla` and have makemuttrc
produce the set code and update its own saved version of the old one.
That way, you can restore it using something like `makemuttrc restore
resolve`.  (I'm actually leaning towards the possibility of writing a
full-blown version of such a script/program, as it'll really simplify many
of my Mutt RC files.  Has anybody else done something similar already?)

 - Dave

-- 
Uncle Cosmo, why do they call this a word processor?
It's simple, Skyler.  You've seen what food processors do to food, right?

Please visit this link:
http://rotter.net/israel

Attachment: pgpQGsdoayHL4.pgp
Description: PGP signature