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

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

Re: First line in buffer special?


From: Pascal J. Bourguignon
Subject: Re: First line in buffer special?
Date: Wed, 08 Dec 2010 15:35:47 -0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)

Elena <egarrulo@gmail.com> writes:
> I've noticed that some modes are able to make the first visible line
> of a buffer special.  Is this some clever Elisp code, or it is a
> standard ELisp feature?  If the latter, how is it called?

The general trick, when you notice that some mode does something
interesting, is to go have a look at the sources of that mode!

I have absolutely no idea how it is done!

But indeed, I've noticed that in erc.  So let's see what erc sources say
about it...

Ah, yes, close to the mode line stuff in the sources of erc, there's
another variable with a promising name, let's C-h v that variable.  Yes,
it seems to be that, and entirely automatic even.  Let's try it:
(setf ... "Hello") C-x C-e

Yep, it works!


-- 
__Pascal Bourguignon__                     http://www.informatimago.com/
A bad day in () is better than a good day in {}.


reply via email to

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