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

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

bug#26624: 26.0.50; Generalized variable `buffer-local-value' does't res


From: Michael Heerdegen
Subject: bug#26624: 26.0.50; Generalized variable `buffer-local-value' does't restore local flag
Date: Wed, 24 Jan 2018 15:33:38 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Philipp Stephani <p.stephani2@gmail.com> writes:

> Thanks for this great analysis. Given this, it seems that the place
> definition for `buffer-local-value' should be removed from gv.el.

But hmm - surely there are other functions where `cl-letf' doesn't
exactly restore the previous state - `alist-get', for example:

#+begin_src emacs-lisp
(setq my-alist '((x . 1)))
(ignore (cl-letf (((alist-get 'y my-alist) 17)) my-alist))
my-alist
==> ((y) (x . 1))
#+end_src

(admittedly, this is not as serious as the `buffer-local-value' case).
Also, as another, different problematic case, the manual warns about
`point' to be used with `cl-letf'.

So, I wonder if, instead of removing the gv-setter definition for
`buffer-local-value', we should instead add some more text about how
`cl-letf' can have surprising effects to the manual.


Michael.





reply via email to

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