[PATCH] indexcolor patch, next iteration
Hi,
I've got another version of my indexcolor patch ready. It's
generally cleaned up, has a PATCHES entry, and the documentation is
updated. I consider it ready for much broader use.
It's not backwards compatible, since the names of the color objects
changed. All of them now have an index_ prefix.
index_author and index_subject do now both require a pattern as an
extra argument, which is compatible to the pattern that index
requires. This pattern can be used to change colors of
subject/author depending on the content of the message headers
and/or body.
Problems related to runtime color change remarked by Alain Bench are
fixed (thanks to Christoph Berg for providing the necessary code).
Support for collapsed thread count coloring (%M) is now available.
Support for changing only fg or bg and support for combining color
and mono attributes still isn't implemented though.
Technical details:
I've tried several approaches to implementing pattern matching,
mostly directly determining the right color in hdrline.c. This
sucked though, because it's really hard to pass that information
down the line in a sane way.
What I'm doing now is exactly the same as in the old indexcolor
patch, but if MT_INDEX_(AUTHOR|SUBJECT) are found by
print_enriched_string it applies pattern matching to find the right
color, instead of using ColorDefs[MT_INDEX_....] directly.
IMO this is the nicest and least intrusive way to implement all
these features.
The remainder of the differences to the previous patch are mostly
the colorline definitions + support code and documentation updates.
Thanks to all the people who provided comments, criticism and
improved patches. I'd be happy about more feedback.
Cheers,
Greek0