mutt 1.5.4i's signature-recognition code
On Wed, Oct 08, 2003 at 03:24:08PM +0200, Georg Neis wrote:
> Hallo!
Ohayo gozaimasu!
> I'm using Mutt 1.5.4i and its builtin pager.
>
> When I read an email with the following content in the body (without
> the #--- lines) then everything is ok, i.e. Mutt displays the "normal"
> text in white on black and the signature (the "-- " and everything
> underneath) in brightblack on black:
>
> #---------------------------------------------------------------------
> gasdgas
>
> --
> adsfasdfadf
> dfasdfasdfadfad
> adfadfadfadfadfasdf
>
> adsfadsfasdfadfasdfadf
> #---------------------------------------------------------------------
>
> When I read an email with the following content then Mutt displays
> the "normal" text properly. But the last line of the signature is
> displayed in white on black as if it would be "normal" text, too (the
> other lines of the signature are in brightblack on black, as
> expected):
>
> #---------------------------------------------------------------------
> gasdgas
>
> --
> adsfasdfadf
>
>
> dfasdfasdfadfad
> adfadfadfadfadfasdf
>
> adsfadsfasdfadfasdfadf
> #---------------------------------------------------------------------
>
> In my muttrc, there is:
> color normal white black
> color signature brightblack black
>
> 'normal' is the only object with "white" as its foreground color.
>
> Gru?, Georg
>From reading the code a little, it seems like this is the way mutt
figures out what should be colored as a signature:
. starting with a line containing only "-- ":
.- lines containing text which follow lines that are sig-colored
.- empty lines that are within the first 4 lines of a sig block
So.. Any empty line after the 4th will break the signature block, and
revert to normal colored text. Also, anything that is colored
something other than normal, quoted or header before the sig check
will break the block.
The 4-line limit is a compile-time option, "NumSigLines" defined in
pager.c. I believe it includes the "-- " line.
--
one line sig
and
--
three line sig
with space in the middle
and
--
four line sig
which goes beyond
the 4-line limit
and then breaks
and
--
four line sig
with space in
the middle
and
--
three line sig
with text on
each line
so des ka,
Allister