]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix execute-extended-command-for-buffer in fundamental-mode
authorLars Ingebrigtsen <larsi@gnus.org>
Thu, 20 Jan 2022 10:00:26 +0000 (11:00 +0100)
committerLars Ingebrigtsen <larsi@gnus.org>
Thu, 20 Jan 2022 10:00:41 +0000 (11:00 +0100)
* lisp/simple.el (execute-extended-command-for-buffer): Protect
against the current local map being nil (bug#52907).

lisp/simple.el

index 355ebd690fff77041bc07bcd85eeed199b5cd190..9c17f0ea6d3ceff0259000337cf3c690aab54a60 100644 (file)
@@ -2296,8 +2296,8 @@ maps."
    (let* ((execute-extended-command--last-typed nil)
           (keymaps
            ;; The major mode's keymap and any active minor modes.
-           (cons
-            (current-local-map)
+           (nconc
+            (and (current-local-map) (list (current-local-map)))
             (mapcar
              #'cdr
              (seq-filter