From 7bea623f2ba9bbce1e0098ec191aac3c93b48b78 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Tue, 18 Mar 2025 00:33:32 +0100 Subject: [PATCH] ; Use defvar-keymap in define-derived-mode * lisp/emacs-lisp/derived.el (define-derived-mode): Use defvar-keymap. This change is for documentation purposes on macro expansion. (cherry picked from commit 5f4c9053538fc1bf472c1be9a203db5c6178ea02) --- lisp/emacs-lisp/derived.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/emacs-lisp/derived.el b/lisp/emacs-lisp/derived.el index 0bd86299584..a19439d7925 100644 --- a/lisp/emacs-lisp/derived.el +++ b/lisp/emacs-lisp/derived.el @@ -217,7 +217,7 @@ No problems result if this variable is not bound. child))) (unless (boundp ',map) (put ',map 'definition-name ',child)) - (with-no-warnings (defvar ,map (make-sparse-keymap))) + (with-no-warnings (defvar-keymap ,map)) (unless (get ',map 'variable-documentation) (put ',map 'variable-documentation ,(format "Keymap for `%s'." child))) -- 2.39.5