From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kevin Rodgers Newsgroups: gmane.emacs.help Subject: Re: header-line-format hacking Date: Wed, 26 Jan 2005 16:37:44 -0700 Message-ID: <35qnudF4mocesU1@individual.net> References: <87is5ln5pd.fsf@robotron.ath.cx> <35nimiF4q87bsU1@individual.net> <7emzuw4fka.fsf@ada2.unipv.it> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1106782974 3950 80.91.229.6 (26 Jan 2005 23:42:54 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 26 Jan 2005 23:42:54 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jan 27 00:42:49 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CtwoC-00052J-00 for ; Thu, 27 Jan 2005 00:42:49 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ctx0X-0005oy-GD for geh-help-gnu-emacs@m.gmane.org; Wed, 26 Jan 2005 18:55:33 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 21 Original-X-Trace: individual.net hliXd9BPhyu6EHfgzsMgVwCIIMR5DTgNEe0CaBJX2rWLL/BQc= User-Agent: Mozilla Thunderbird 0.9 (X11/20041105) X-Accept-Language: en-us, en In-Reply-To: Original-Xref: shelby.stanford.edu gnu.emacs.help:128173 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:23674 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:23674 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