help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: header-line-format hacking


From: Kevin Rodgers
Subject: Re: header-line-format hacking
Date: Wed, 26 Jan 2005 16:37:44 -0700
User-agent: Mozilla Thunderbird 0.9 (X11/20041105)

ytrewq1 wrote:
>>more idiomatic is to have the minor mode define a variable
>>that has value nil when the minor mode is inactive.  then,
>>you add the variable to the formatting tree unconditionally,
>>and the display engine takes care of things automatically.
>
> I don't think I quite follow you.  Do you mean that the minor
> mode code should not be modifying header-line-format?  If it's
> not supposed to, does that mean each user should add something
> to their .emacs to define header-line-format?

No.  Instead of adding the value of foo-header-line-format to
header-line-format when the foo minor mode is turned on then removing it
when the mode is turned off, add the foo-header-line-format symbol
itself unconditionally when foo.el is loaded.  foo-header-line-format
should be a buffer local variable whose default value is nil; turning
the mode on should set it to your desired display format; turning the
mode off should set it to back to nil.

--
Kevin Rodgers

reply via email to

[Prev in Thread] Current Thread [Next in Thread]