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: Tue, 25 Jan 2005 11:49:51 -0700 Message-ID: <35nimiF4q87bsU1@individual.net> References: <87is5ln5pd.fsf@robotron.ath.cx> 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 1106679228 2955 80.91.229.6 (25 Jan 2005 18:53:48 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 25 Jan 2005 18:53:48 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Jan 25 19:53:28 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 1CtVod-0006ve-00 for ; Tue, 25 Jan 2005 19:53:27 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1CtW0t-0005S5-Uf for geh-help-gnu-emacs@m.gmane.org; Tue, 25 Jan 2005 14:06:07 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!news2.google.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 26 Original-X-Trace: individual.net mlG7Hrm7j2qxCkaAuAtEEANJcGHheTau6G++nHOZXz5qCMwQE= 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:128125 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:23623 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:23623 ytrewq1 wrote: > David Hansen writes: >>Just set `header-line-format', e.g: >> >>(setq header-line-format (concat (or header-line-format "") " test")) >> >>will append " test" to the header line of the current buffer. > > I was under the impression that the header-line-format variable > can hold a template like the one that mode-line-format uses. If > that's the case, wouldn't the code snippet above not work for > non-string templates? Exactly. (setq header-line-format (cond ((null header-line-format) my-header-line-format) ((stringp header-line-format) (list header-line-format my-header-line-format)) ((symbolp header-line-format) (list (list t header-line-format) my-header-line-format)) ((consp header-line-format) (append header-line-format (list my-header-line-format))))) -- Kevin Rodgers