bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#65209: 30.0.50; Unexpected behaviour of setq-local


From: Stefan Monnier
Subject: bug#65209: 30.0.50; Unexpected behaviour of setq-local
Date: Wed, 23 Aug 2023 08:51:44 -0400
User-agent: Gnus/5.13 (Gnus v5.13)

> (TBH, the first one is almost self-evident, and I find nothing
> surprising or unexpected in it.)

A more corner case is:

    (defvar-local my-foo :default)
    (with-temp-buffer
      (let ((my-foo :global-let))
        (with-temp-buffer
          (setq my-foo :set)
          (list my-foo (with-temp-buffer my-foo)))))

vs

    (defvar-local my-foo :default)
    (with-temp-buffer
      (let ((my-foo :global-let))
        (setq my-foo :set)
        (list my-foo (with-temp-buffer my-foo))))

IIRC this is done purposefully (the code has to work harder to get this
semantics), but not really documented, and I can't offhand give you
a good reason for that semantics.


        Stefan






reply via email to

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