From 9d0da923ebd2b78abb6e02f0b90cfe9d818eb301 Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Tue, 22 Mar 2011 21:58:27 +0100 Subject: [PATCH] lisp/emacs-lisp/derived.el: Don't warn about keymaps already `defconst'ed. --- lisp/ChangeLog | 6 ++++++ lisp/emacs-lisp/derived.el | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6b7dd5a0463..e508174e118 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2011-03-22 Juanma Barranquero + + * emacs-lisp/derived.el (define-derived-mode): Wrap declaration of + keymap variable in `with-no-warnings' to avoid a warning when the + keymap has been already `defconst'ed. + 2011-03-22 Leo Liu * abbrev.el (write-abbrev-file): Use utf-8 for writing if it can diff --git a/lisp/emacs-lisp/derived.el b/lisp/emacs-lisp/derived.el index 425a77ee77f..1db98ac39c8 100644 --- a/lisp/emacs-lisp/derived.el +++ b/lisp/emacs-lisp/derived.el @@ -201,7 +201,7 @@ No problems result if this variable is not bound. name)))) (unless (boundp ',map) (put ',map 'definition-name ',child)) - (defvar ,map (make-sparse-keymap)) + (with-no-warnings (defvar ,map (make-sparse-keymap))) (unless (get ',map 'variable-documentation) (put ',map 'variable-documentation (purecopy ,(format "Keymap for `%s'." child)))) -- 2.39.5