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