unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Daniel Mendler <mail@daniel-mendler.de>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: 52907@debbugs.gnu.org
Subject: bug#52907: 28.0.90; M-X is broken if (current-local-map)=nil
Date: Sat, 15 Jan 2022 15:29:54 +0100	[thread overview]
Message-ID: <2105359a-f57f-5c9f-d06a-1f263f125f2b@daniel-mendler.de> (raw)
In-Reply-To: <87lezhxrbk.fsf@gnus.org>

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?





  reply	other threads:[~2022-01-15 14:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-30 23:29 bug#52907: 28.0.90; M-X is broken if (current-local-map)=nil Daniel Mendler
2022-01-15  9:48 ` Lars Ingebrigtsen
2022-01-15 14:29   ` Daniel Mendler [this message]
2022-01-15 21:30   ` Michael Heerdegen
2022-01-20 10:01     ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2105359a-f57f-5c9f-d06a-1f263f125f2b@daniel-mendler.de \
    --to=mail@daniel-mendler.de \
    --cc=52907@debbugs.gnu.org \
    --cc=larsi@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).