Subject: Re: bug#64439: 28.2; auto-fill-mode gets turned on all over the place

From: Stefan Monnier <[email-masked]>
Date: Mon, 10 Jul 2023 13:28:22 -0400

[ Adding Noam, because this seems related to
  https://github.com/joaotavora/yasnippet/issues/919.  ]

> Stefan, are there any other situations where setting a buffer-local
> variable will actually set its default value?

Depends what you mean, but if you do:

    (let ((auto-fill-function #'foo))
      [...]
      (setq auto-fill-function #'bar)
      [...])

then `auto-fill-function` will not be made buffer-local.  But that won't
set the toplevel default value either (that default value will be
reverted to nil when we leave the `let`).

Interactions between buffer-local values and let-bindings can be tricky,
tho, so there might still be bugs in there.

Jim, did you collect various backtraces?  Do you still have them?
Can you check more thoroughly to try and see what they all have in common
(in addition to `ask-user-about-supersession-threat` and "Tramp")?

Can you get an interactive backtrace buffer?  If so, I'd be curious to
know the values that

    e (list auto-fill-function (default-value 'auto-fill-function)) RET

returns and more importantly, how it varies from frame to frame.

        Stefan