GNU bug report logs -
#52907
28.0.90; M-X is broken if (current-local-map)=nil
Previous Next
Reported by: Daniel Mendler <mail <at> daniel-mendler.de>
Date: Thu, 30 Dec 2021 23:31:02 UTC
Severity: normal
Tags: moreinfo
Found in version 28.0.90
Fixed in version 28.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #13 received at 52907 <at> debbugs.gnu.org (full text, mbox):
On 1/15/22 10:48, Lars Ingebrigtsen wrote:
>> 1. Start emacs -Q
>>
>> 2. Define in the scratch buffer
>> (defun broken-command ()
>> (interactive fundamental-mode))
>>
>> 3. Switch to fundamental mode
>> (fundamental-mode)
>>
>> 4. M-X brok TAB ===> Error (see below)
>>
>> The problem is that the (current-local-map) is nil. This breaks
>> the predicate of execute-extended-command-for-buffer.
There are no additional steps. I can still reproduce this in Emacs 28.
The problematic definition is:
(keymaps
;; The major mode's keymap and any active minor modes.
(cons
(current-local-map) ;; can be nil!
(mapcar
#'cdr
(seq-filter
(lambda (elem)
(symbol-value (car elem)))
minor-mode-map-alist))))
The map is nil, when I evaluate in the scratch buffer:
1. (fundamental-mode)
2. (current-local-map) -> returns nil
I haven't tried 29 yet, but the problematic definition is still present
there. However maybe where-is-internal has been changed to accept nil
keymaps?
This bug report was last modified 3 years and 122 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.