emacs-devel
[Top][All Lists]
Advanced

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

Re: master e8488bcc9c: Avoid having font locking triggering unnecessary


From: Lars Ingebrigtsen
Subject: Re: master e8488bcc9c: Avoid having font locking triggering unnecessary auto-saving
Date: Tue, 10 May 2022 13:45:56 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Stefan Monnier <monnier@iro.umontreal.ca> writes:

> Fair enough.  In that case, maybe it can even call
> `restore-buffer-modified-p` unconditionally.

Probably, but I don't think it makes much difference.

>> Yeah, the semantics are slightly obscure now, but you're not supposed to
>> call the function with `autosaved' when it hasn't been modified.
>> Perhaps it should just signal an error in that case?
>
> Why not make it DTRT and make sure
>
>     (buffer-modified-p (restore-buffer-modified-p FLAG))
>
> always returns FLAG if FLAG is one of nil/t/autosaved (and add a few
> tests while we're at it)?

I'm actually not quite sure what the semantics should be if the buffer
is buffer-modified-p => nil and we're called with
(restore-buffer-modified-p 'autosaved)...

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no



reply via email to

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