unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: master b2e6e95581: Only reset buffer-local buffer-stale-function in make-indirect-buffer
Date: Tue, 12 Jul 2022 14:38:53 +0200	[thread overview]
Message-ID: <87r12qqzdu.fsf@gnus.org> (raw)
In-Reply-To: <jwvv8s363xd.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Mon, 11 Jul 2022 11:59:20 -0400")

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

>> +      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?

Yup; now adjusted.

Eli Zaretskii <eliz@gnu.org> writes:

> 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.

nil is documented to be a legacy value, so it shouldn't be used.

Eli Zaretskii <eliz@gnu.org> writes:

> 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?

clone_per_buffer_values copies the local variables from the base buffer.

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



  parent reply	other threads:[~2022-07-12 12:38 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <165754851290.3031.9159264035427641051@vcs2.savannah.gnu.org>
     [not found] ` <20220711140833.3343AC0D772@vcs2.savannah.gnu.org>
2022-07-11 15:59   ` master b2e6e95581: Only reset buffer-local buffer-stale-function in make-indirect-buffer Stefan Monnier
2022-07-11 17:20     ` Eli Zaretskii
2022-07-11 17:49       ` Eli Zaretskii
2022-07-12 12:38     ` Lars Ingebrigtsen [this message]
2022-07-12 13:42       ` Eli Zaretskii
2022-07-12 13:53         ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87r12qqzdu.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).