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: Eli Zaretskii
Subject: Re: master e8488bcc9c: Avoid having font locking triggering unnecessary auto-saving
Date: Mon, 09 May 2022 19:30:39 +0300

> From: Lars Ingebrigtsen <larsi@gnus.org>
> Cc: emacs-devel@gnu.org, Eli Zaretskii <eliz@gnu.org>
> Date: Mon, 09 May 2022 18:05:55 +0200
> 
> Stefan Monnier <monnier@iro.umontreal.ca> writes:
> 
> > Maybe we could make `buffer-modified-p` return `autosaved` rather than
> > `t` when the buffer is modified but auto-saved, and then
> > have `restore-buffer-modified-p` accept such a value accordingly, yes.
> 
> Unfortunately `buffer-modified-p' is documented to return t...  Changing
> that feels a bit "eh".  (Which is why we should always say non-nil.)
> 
> I don't think adding an extra call to `recent-auto-save-p' to the macro
> would be that bad, but if people think altering the return value of
> `buffer-modified-p' is OK, we can do that.  Eli, what do you think?

I don't see any Lisp comparing the return value to t, and only one
place in C which might need some change due to this, so I think
returning non-nil, non-t value from buffer-modified-p is a better way.



reply via email to

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