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))))
`(let ((parent (char-table-parent ,syntax)))
(unless (and parent
(not (eq parent (standard-syntax-table))))
- (set-char-table-parent ,syntax (syntax-table)))))))
-
+ (set-char-table-parent ,syntax (syntax-table)))))
+ ,(when declare-abbrev
+ `(unless (or (abbrev-table-get ,abbrev :parents)
+ ;; This can happen if the major mode defines
+ ;; the abbrev-table to be its parent's.
+ (eq ,abbrev local-abbrev-table))
+ (abbrev-table-put ,abbrev :parents
+ (list local-abbrev-table))))))
(use-local-map ,map)
,(when syntax `(set-syntax-table ,syntax))
,(when abbrev `(setq local-abbrev-table ,abbrev))