From: Stefan Kangas Date: Mon, 17 Mar 2025 23:33:32 +0000 (+0100) Subject: ; Use defvar-keymap in define-derived-mode X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=7bea623f2ba9bbce1e0098ec191aac3c93b48b78;p=emacs.git ; 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) --- 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)))