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

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

Re: [Q] How to make text invisible without modifying the buffer?


From: Eli Zaretskii
Subject: Re: [Q] How to make text invisible without modifying the buffer?
Date: Sat, 14 Aug 2021 09:03:30 +0300

> From: Rodrigo Morales <moralesrodrigo1100@gmail.com>
> Date: Fri, 13 Aug 2021 18:39:57 -0500
> 
> #+BEGIN_SRC elisp
> (put-text-property (point-at-bol) (+ (point-at-eol) 1) 'invisible t)
> #+END_SRC
> 
> The problem with this expression is the fact that it modifies the
> current buffer and I don't want this to happen, so my question is: How
> to make a line invisible without making the buffer to think that a
> modification has been performed?

The usual method is to wrap your code in with-silent-modifications.



reply via email to

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