1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-07 06:50:23 -08:00

* 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
This commit is contained in:
Stefan Monnier 2011-07-05 14:26:33 -04:00
parent 2de69e00f3
commit 450a0f0927
3 changed files with 15 additions and 6 deletions

View file

@ -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)

View file

@ -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