emacs-devel
[Top][All Lists]
Advanced

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

Re: master b2e6e95581: Only reset buffer-local buffer-stale-function in


From: Eli Zaretskii
Subject: Re: master b2e6e95581: Only reset buffer-local buffer-stale-function in make-indirect-buffer
Date: Mon, 11 Jul 2022 20:49:00 +0300

> Date: Mon, 11 Jul 2022 20:20:31 +0300
> From: Eli Zaretskii <eliz@gnu.org>
> Cc: emacs-devel@gnu.org, larsi@gnus.org
> 
> > > +      if (!NILP (Flocal_variable_p (Qbuffer_stale_function, 
> > > base_buffer)))
> > > + Fset (Qbuffer_stale_function, Qbuffer_stale__default_function);
> > 
> > Shouldn't this use `kill-local-variable` instead or something like that?
> 
> I'm also not sure it is wise not to use nil here, since
> buffer-stale--default-function is only defined when files.el is
> loaded, so this could cause trouble during bootstrap (if not now, then
> in some distant future).  At least Ffboundp test is in order, I think.

Come to think of this: why do we test that the variable is
buffer-local?  This is in make-indirect-buffer, where the buffer was
not yet "released" into the world, so how come it could have this
variable as buffer-local already?

I think the code should instead _force_ the variable to be
buffer-local, _and_ unconditionally set its buffer-local value to nil.



reply via email to

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