]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/emacs-lisp/lisp-mode.el (lisp-interaction-mode-abbrev-table):
authorStefan Monnier <monnier@iro.umontreal.ca>
Tue, 5 Jul 2011 18:26:33 +0000 (14:26 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Tue, 5 Jul 2011 18:26:33 +0000 (14:26 -0400)
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
lisp/ChangeLog
lisp/emacs-lisp/derived.el
lisp/emacs-lisp/lisp-mode.el

index 05fbbfa89fca4d7be7b17f4eadde090e2c1c8261..66215266bdb4d454c3d9202ee6be3939ae4d1453 100644 (file)
@@ -1,3 +1,10 @@
+2011-07-05  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * emacs-lisp/lisp-mode.el (lisp-interaction-mode-abbrev-table):
+       Let define-derived-mode define it.
+       * emacs-lisp/derived.el (define-derived-mode): Try to avoid creating
+       cycles of abbrev-table inheritance (bug#8998).
+
 2011-07-05  Roland Winkler  <winkler@gnu.org>
 
        * textmodes/bibtex.el: Add support for biblatex.
        (bibtex-entry-alist, bibtex-field-alist): New widgets.
        (bibtex-set-dialect): New command.
        (bibtex-entry-type, bibtex-entry-head)
-       (bibtex-entry-maybe-empty-head, bibtex-any-valid-entry-type): Bind
-       via bibtex-set-dialect.
+       (bibtex-entry-maybe-empty-head, bibtex-any-valid-entry-type):
+       Bind via bibtex-set-dialect.
        (bibtex-Article, bibtex-Book, bibtex-Booklet, bibtex-InBook)
        (bibtex-InCollection, bibtex-InProceedings, bibtex-Manual)
        (bibtex-MastersThesis, bibtex-Misc, bibtex-PhdThesis)
        (bibtex-Proceedings, bibtex-TechReport, bibtex-Unpublished):
        Define via bibtex-set-dialect.
-       (bibtex-name-in-field, bibtex-remove-OPT-or-ALT): Obey
-       bibtex-no-opt-remove-re.
+       (bibtex-name-in-field, bibtex-remove-OPT-or-ALT):
+       Obey bibtex-no-opt-remove-re.
        (bibtex-vec-push, bibtex-vec-incr): New functions.
        (bibtex-format-entry, bibtex-field-list)
        (bibtex-print-help-message, bibtex-validate)
index e8f799b9afcb3208d61c08d5375d9508e675eca7..4fda2bf1d529059129f850877a29008dd0a0b99d 100644 (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)
index 114e9755039c5a541218cebfaf2811cb429945e5..32f67a173f991a701ae64f2a92060216d03b41be 100644 (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