From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Thien-Thi Nguyen Newsgroups: gmane.emacs.help Subject: Re: (apparently lost, so rewritten and reposted) Re: header-line-format hacking Date: Mon, 31 Jan 2005 10:54:42 +0100 Organization: sometimes Message-ID: <7ek6ptordp.fsf@ada2.unipv.it> References: <87is5ln5pd.fsf@robotron.ath.cx> <35nimiF4q87bsU1@individual.net> <7emzuw4fka.fsf@ada2.unipv.it> <7eis5k46ut.fsf@ada2.unipv.it> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1107167211 28297 80.91.229.6 (31 Jan 2005 10:26:51 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 31 Jan 2005 10:26:51 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Jan 31 11:26:44 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 1CvYlX-0001Ej-00 for ; Mon, 31 Jan 2005 11:26:43 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1CvYyE-0001Ua-7E for geh-help-gnu-emacs@m.gmane.org; Mon, 31 Jan 2005 05:39:50 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!logbridge.uoregon.edu!news-FFM2.ecrc.net!newsfeed00.sul.t-online.de!t-online.de!news.zanker.org!border2.nntp.ams.giganews.com!nntp.giganews.com!uio.no!quimby.gnus.org!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 31 Original-NNTP-Posting-Host: ada2.unipv.it Original-X-Trace: quimby.gnus.org 1107165283 16142 193.204.44.145 (31 Jan 2005 09:54:43 GMT) Original-X-Complaints-To: usenet@quimby.gnus.org Original-NNTP-Posting-Date: Mon, 31 Jan 2005 09:54:43 +0000 (UTC) User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (gnu/linux) Cancel-Lock: sha1:iTsoUkXbpN7LTOg6lSdTycjfekM= Original-Xref: shelby.stanford.edu gnu.emacs.help:128263 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:23770 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:23770 ytrewq1 writes: > Thanks for the explanation. well, looks like the explanation did not cover this case... > I think I understand how this approach could work for > mode-line-format as it's default value is non-nil. However, > on my system, header-line-format has a default value of > nil. As far as I can tell, if a buffer's header-line-format > value is modified to be non-nil a header is displayed -- so > if a buffer starts out w/ a header-line-format value of nil > and minor mode code modifies it to be non-nil, deactivation > of the minor mode will cause the buffer to have an empty > header line ("baggage"). > > Is there a way to avoid this "baggage" using the idiomatic > approach? i see in dispextern.h that the macro WINDOW_WANTS_HEADER_LINE_P only checks that `header-line-format' is non-nil; there is no provision to conditionally display the header line based on its contents. thus, there is no way to use the same idiom as in the mode line, as you have correctly surmised. thanks for motivating me to look at the code more closely. probably you can lop off my part of the thread thus far and replace it simply w/ "yes" as a response to your original question, w/o incident. thi