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: Tue, 25 Jan 2005 11:49:51 -0700
User-agent: Mozilla Thunderbird 0.9 (X11/20041105)

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

reply via email to

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