summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/derived.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/emacs-lisp/derived.el')
-rw-r--r--lisp/emacs-lisp/derived.el5
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/derived.el b/lisp/emacs-lisp/derived.el
index e8f799b9afc..4fda2bf1d52 100644
--- a/lisp/emacs-lisp/derived.el
+++ b/lisp/emacs-lisp/derived.el
@@ -255,7 +255,10 @@ No problems result if this variable is not bound.
(not (eq parent (standard-syntax-table))))
(set-char-table-parent ,syntax (syntax-table)))))
,(when declare-abbrev
- `(unless (abbrev-table-get ,abbrev :parents)
+ `(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)