[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#39149: 27.0.50; describe-buffer-bindings is calling :filter function
From: |
Stefan Kangas |
Subject: |
bug#39149: 27.0.50; describe-buffer-bindings is calling :filter function in wrong buffer |
Date: |
Sat, 31 Oct 2020 21:31:12 -0700 |
Stefan Kangas <stefankangas@gmail.com> writes:
>>> To reproduce (eval in scratch buffer)
>>> (define-key global-map (kbd "C-c C-l r")
>>> `(menu-item "2" switch-to-buffer
>>> :filter ,(lambda (cmd)
>>> (print (format "Called in %s" (current-buffer)))
>>> cmd)))
>>> (with-temp-buffer
>>> (with-output-to-string
>>> (describe-buffer-bindings (get-buffer "*scratch*") [3 12] t)))
>>>
>>> This outputs:
>>>
>>> \"Called in *temp*\"
>>
>> I tried this recipe, but I'm not getting the :filter function called at
>> all. Do you have a recipe, starting from "emacs -Q", that reproduces
>> this bug?
>
> I can reproduce the above on Emacs 26.3, but not on master.
This change in behavior was caused by this commit:
commit 8a1441310aa151e739cfed3bd2eff3358edc8001
Author: Stefan Kangas <stefan@marxist.se>
Date: Sun Oct 18 15:32:22 2020 +0200
Prefer Lisp version of describe-map-tree
So as suspected, there is a difference in behavior between the new Lisp
version of describe-map-tree and the new C version.
- bug#39149: 27.0.50; describe-buffer-bindings is calling :filter function in wrong buffer,
Stefan Kangas <=