From 1a1e3f3207b660b42127bde55119d233aca02a1c Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Fri, 1 Jul 2011 12:41:02 -0400 Subject: [PATCH] * lisp/emacs-lisp/derived.el (define-derived-mode): Make abbrev-table inherit from parent. --- lisp/ChangeLog | 5 +++++ lisp/emacs-lisp/derived.el | 7 +++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4167d86f972..2bb0bad7282 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2011-07-01 Stefan Monnier + + * emacs-lisp/derived.el (define-derived-mode): Make abbrev-table + inherit from parent. + 2011-07-01 Lars Magne Ingebrigtsen * dired-aux.el (dired-diff): Doc fixup (bug#8816). diff --git a/lisp/emacs-lisp/derived.el b/lisp/emacs-lisp/derived.el index 1db98ac39c8..e8f799b9afc 100644 --- a/lisp/emacs-lisp/derived.el +++ b/lisp/emacs-lisp/derived.el @@ -253,8 +253,11 @@ No problems result if this variable is not bound. `(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 (abbrev-table-get ,abbrev :parents) + (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)) -- 2.39.2