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

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

bug#21252: 25.0.50; `describe-variable': use current buffer, not minibuf


From: Lars Ingebrigtsen
Subject: bug#21252: 25.0.50; `describe-variable': use current buffer, not minibuffer, in `completing-read' PREDICATE
Date: Sun, 01 May 2016 00:09:18 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

Drew Adams <drew.adams@oracle.com> writes:

> This bug is at least as old as Emacs 20!  Never noticed it before.
>
> 1. emacs -Q
> 2. Type this in *scratch* and evaluate it using `C-x C-e':
>
>    (set (make-local-variable 'toto) 42)
>
> 3. C-h v tot TAB
>
> There is no completion for variable `toto'.
>
> The reason is that the PREDICATE arg passed to `completing-read' gets
> evaluated with the minibuffer as the current buffer, and `toto' is not
> bound in the minibuffer.
>
> The predicate should use `with-current-buffer' to make the originally
> current buffer current for the test.

Makes sense.  I applied your changes, slightly changed.

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





reply via email to

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