summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Ingebrigtsen <larsi@gnus.org>2022-01-20 11:00:26 +0100
committerLars Ingebrigtsen <larsi@gnus.org>2022-01-20 11:00:41 +0100
commitba57b78064830caaa253e56decf9686a48fade78 (patch)
tree908ba70c27044145456f67676767c4ebbc882c25
parentef0c1d4c2c8eefe599f50bc99b3dd088433a2842 (diff)
downloademacs-ba57b78064830caaa253e56decf9686a48fade78.tar.gz
Fix execute-extended-command-for-buffer in fundamental-mode
* lisp/simple.el (execute-extended-command-for-buffer): Protect against the current local map being nil (bug#52907).
-rw-r--r--lisp/simple.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/simple.el b/lisp/simple.el
index 355ebd690ff..9c17f0ea6d3 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -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