summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2011-07-05 14:26:33 -0400
committerStefan Monnier <monnier@iro.umontreal.ca>2011-07-05 14:26:33 -0400
commit450a0f09279df347a10d6c1e4b809a5082daf9c8 (patch)
treee5aa0f364fabe2dd0c4c9820d6a90a3765c623df /lisp/emacs-lisp
parent2de69e00f3991d554d37327a2afd71b981d4e488 (diff)
downloademacs-450a0f09279df347a10d6c1e4b809a5082daf9c8.tar.gz
emacs-450a0f09279df347a10d6c1e4b809a5082daf9c8.tar.bz2
emacs-450a0f09279df347a10d6c1e4b809a5082daf9c8.zip
* lisp/emacs-lisp/lisp-mode.el (lisp-interaction-mode-abbrev-table):
Let define-derived-mode define it. * lisp/emacs-lisp/derived.el (define-derived-mode): Try to avoid creating cycles of abbrev-table inheritance. Fixes: debbugs:8998
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/derived.el5
-rw-r--r--lisp/emacs-lisp/lisp-mode.el1
2 files changed, 4 insertions, 2 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)
diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el
index 114e9755039..32f67a173f9 100644
--- a/lisp/emacs-lisp/lisp-mode.el
+++ b/lisp/emacs-lisp/lisp-mode.el
@@ -525,7 +525,6 @@ if that value is non-nil."
"Keymap for Lisp Interaction mode.
All commands in `lisp-mode-shared-map' are inherited by this map.")
-(defvar lisp-interaction-mode-abbrev-table lisp-mode-abbrev-table)
(define-derived-mode lisp-interaction-mode emacs-lisp-mode "Lisp Interaction"
"Major mode for typing and evaluating Lisp forms.
Like Lisp mode except that \\[eval-print-last-sexp] evals the Lisp expression