summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/derived.el11
1 files changed, 6 insertions, 5 deletions
diff --git a/lisp/emacs-lisp/derived.el b/lisp/emacs-lisp/derived.el
index 0f7691af0f4..31170270f5c 100644
--- a/lisp/emacs-lisp/derived.el
+++ b/lisp/emacs-lisp/derived.el
@@ -217,16 +217,17 @@ No problems result if this variable is not bound.
,(if declare-syntax
`(progn
(unless (boundp ',syntax)
- (put ',syntax 'definition-name ',child))
- (defvar ,syntax (make-syntax-table))
+ (put ',syntax 'definition-name ',child)
+ (defvar ,syntax (make-syntax-table)))
(unless (get ',syntax 'variable-documentation)
(put ',syntax 'variable-documentation
(purecopy ,(format "Syntax table for `%s'." child))))))
,(if declare-abbrev
`(progn
- (put ',abbrev 'definition-name ',child)
- (defvar ,abbrev
- (progn (define-abbrev-table ',abbrev nil) ,abbrev))
+ (unless (boundp ',abbrev)
+ (put ',abbrev 'definition-name ',child)
+ (defvar ,abbrev
+ (progn (define-abbrev-table ',abbrev nil) ,abbrev)))
(unless (get ',abbrev 'variable-documentation)
(put ',abbrev 'variable-documentation
(purecopy ,(format "Abbrev table for `%s'." child))))))