[Top][All Lists]

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

Re: Loading files at startup (desktop) and revert-buffer leave buffers *

From: Alan Mackenzie
Subject: Re: Loading files at startup (desktop) and revert-buffer leave buffers **.
Date: Sun, 24 Nov 2002 23:02:04 +0000
User-agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (Linux/2.0.35 (i686))

Eli Zaretskii <> wrote on Sun, 24 Nov 2002 08:01:30
+0200 (IST):

> On Sat, 23 Nov 2002, Alan Mackenzie wrote:

>> I don't see why setting text properties should mark a file as changed.

> Text properties are considered an integral part of the buffer's text
> because you want them to be copied together with that text.  Thus, any
> change in text properties causes the buffer to be marked as modified.

Hmm...  That still doesn't make much sense to me.  What does it mean for
a buffer to be marked as modified?  It surely means "The buffer isn't the
same as the file it was loaded from any more.".

I think the principal use of text properties is for font-locking.
font-lock itself uses a macro "save-buffer-state" to preserve the
buffer-modified state whilst applying text properties, and it isn't the
only package to do this.  Are there any uses of text properties where
applying them to an otherwise unmodified buffer would necessitate the
buffer being saved to its file?

> If you want to put a face or some other display-related feature on a 
> text, but not have it copied with the text, use overlays.

Ah, overlays.  What are they?  The elisp manual just says "they're a bit
like text properties in some ways, but otherwise totally different.".
Other than the fact that they don't set the buffer-changed flag, I can't
see any uses for them distinct from those of text properties.  I suppose
I'll need to grep through the emacs /lisp directory to see how they're

Thanks for the answer.

Alan Mackenzie (Munich, Germany)
Email: aacm@muuc.dee; to decode, wherever there is a repeated letter
(like "aa"), remove half of them (leaving, say, "a").

reply via email to

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