emacs-devel
[Top][All Lists]
Advanced

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

Text Properties And Buffer Modification


From: T.V Raman
Subject: Text Properties And Buffer Modification
Date: Tue, 04 Dec 2018 15:39:31 -0800

At present, modifying text properties (adding, removing or changing
properties) markes the buffer as  modified.
Since property changes are mostly cosmetic, is there a good reason why
this is so?

Given the present state of buffer-modified status with respect to
text-properties, one  has to be fairly careful e.g.
naively writing 
(with-silent-modifications (put-text-property ...))
will work *most of the time* except when you say something like:
(with-silent-modifications 
  (put-text-property beg end 'face 'bold other-buffer))

you actually need to write this:

(with-silent-modifications 
  (with-current-buffer other-buffer 
    (put-text-property beg end 'face 'bold other-buffer)))

-- 
Id: kg:/m/0285kf1 



reply via email to

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