[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#65209: 30.0.50; Unexpected behaviour of setq-local
From: |
Michael Heerdegen |
Subject: |
bug#65209: 30.0.50; Unexpected behaviour of setq-local |
Date: |
Mon, 14 Aug 2023 05:24:49 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of
text editors" <bug-gnu-emacs@gnu.org> writes:
> The patch below seems to work (for some reason, I'm getting several
> errors in `make check` today, but they seems unaffected by this patch
> (i.e. I get the same errors in a vanilla build)).
Thanks that you looked closer. I've installed the patch locally and
will report back when I find any problem.
> +(defvar-local data-tests--bug65209 :default-value)
> +
> +(ert-deftest data-tests-make-local-bug65209 ()
> + (let (vli vlo vgi vgo)
> + (with-temp-buffer
> + (let ((data-tests--bug65209 :let-bound-value))
> + ;; While `setq' would not make the var buffer-local
> + ;; (because we'd be setq-ing the let-binding instead),
> + ;; `setq-local' definitely should.
> + (setq-local data-tests--bug65209 :buffer-local-value)
> + (setq vgi (with-temp-buffer data-tests--bug65209))
> + (setq vli data-tests--bug65209))
> + (setq vgo (with-temp-buffer data-tests--bug65209))
> + (setq vlo data-tests--bug65209))
> + (should (equal (list vli vlo vgi vgo)
> + '(:buffer-local-value :buffer-local-value
> + :let-bound-value :default-value)))))
> +
That would actually be a very good example for
(info "(elisp) Intro to Buffer-Local") if you replace vli, vlo, vgi, vgo
with non-abbreviating names.
Michael.
- bug#65209: 30.0.50; Unexpected behaviour of setq-local, (continued)
- bug#65209: 30.0.50; Unexpected behaviour of setq-local, Michael Heerdegen, 2023/08/11
- bug#65209: 30.0.50; Unexpected behaviour of setq-local, Gerd Möllmann, 2023/08/11
- bug#65209: 30.0.50; Unexpected behaviour of setq-local, Eli Zaretskii, 2023/08/11
- bug#65209: 30.0.50; Unexpected behaviour of setq-local, Gerd Möllmann, 2023/08/11
- bug#65209: 30.0.50; Unexpected behaviour of setq-local, Eli Zaretskii, 2023/08/11
- bug#65209: 30.0.50; Unexpected behaviour of setq-local, Michael Heerdegen, 2023/08/13
- bug#65209: 30.0.50; Unexpected behaviour of setq-local, Eli Zaretskii, 2023/08/13
- bug#65209: 30.0.50; Unexpected behaviour of setq-local, Drew Adams, 2023/08/11
bug#65209: 30.0.50; Unexpected behaviour of setq-local, Stefan Monnier, 2023/08/13
- bug#65209: 30.0.50; Unexpected behaviour of setq-local, Stefan Monnier, 2023/08/13
- bug#65209: 30.0.50; Unexpected behaviour of setq-local,
Michael Heerdegen <=
- bug#65209: 30.0.50; Unexpected behaviour of setq-local, Gerd Möllmann, 2023/08/14
- bug#65209: 30.0.50; Unexpected behaviour of setq-local, Stefan Monnier, 2023/08/18
- bug#65209: 30.0.50; Unexpected behaviour of setq-local, Michael Heerdegen, 2023/08/20
- bug#65209: 30.0.50; Unexpected behaviour of setq-local, Eli Zaretskii, 2023/08/20
- bug#65209: 30.0.50; Unexpected behaviour of setq-local, Michael Heerdegen, 2023/08/21
- bug#65209: 30.0.50; Unexpected behaviour of setq-local, Eli Zaretskii, 2023/08/22
- bug#65209: 30.0.50; Unexpected behaviour of setq-local, Michael Heerdegen, 2023/08/22
- bug#65209: 30.0.50; Unexpected behaviour of setq-local, Eli Zaretskii, 2023/08/23
- bug#65209: 30.0.50; Unexpected behaviour of setq-local, Stefan Monnier, 2023/08/23
- bug#65209: 30.0.50; Unexpected behaviour of setq-local, Michael Heerdegen, 2023/08/23