* lisp/subr.el (define-keymap--define): Error out on invalid
keywords (bug#51268).
* lisp/emacs-lisp/byte-opt.el (byte-optimize-define-keymap): Check
keywords at compile time.
* lisp/vc/cvs-status.el (cvs-status-mode-map): Fix keyword.
(while (and form
(keywordp (car form))
(not (eq (car form) :menu)))
+ (unless (memq (car form)
+ '(:full :keymap :parent :suppress :name :prefix))
+ (error "Invalid keyword: %s" (car form)))
(push (pop form) result)
(when (null form)
(error "Uneven number of keywords in %S" form))
(:parent (setq parent value))
(:suppress (setq suppress value))
(:name (setq name value))
- (:prefix (setq prefix value))))))
+ (:prefix (setq prefix value))
+ (_ (error "Invalid keyword: %s" keyword))))))
(when (and prefix
(or full parent suppress keymap))
;;;
(defvar-keymap cvs-status-mode-map
- :inherit 'cvs-mode-map
+ :parent 'cvs-mode-map
"n" #'next-line
"p" #'previous-line
"N" #'cvs-status-next