diff options
| author | Stefan Monnier | 2011-07-05 14:26:33 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2011-07-05 14:26:33 -0400 |
| commit | 450a0f09279df347a10d6c1e4b809a5082daf9c8 (patch) | |
| tree | e5aa0f364fabe2dd0c4c9820d6a90a3765c623df | |
| parent | 2de69e00f3991d554d37327a2afd71b981d4e488 (diff) | |
| download | emacs-450a0f09279df347a10d6c1e4b809a5082daf9c8.tar.gz 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
| -rw-r--r-- | lisp/ChangeLog | 15 | ||||
| -rw-r--r-- | lisp/emacs-lisp/derived.el | 5 | ||||
| -rw-r--r-- | lisp/emacs-lisp/lisp-mode.el | 1 |
3 files changed, 15 insertions, 6 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 05fbbfa89fc..66215266bdb 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2011-07-05 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * emacs-lisp/lisp-mode.el (lisp-interaction-mode-abbrev-table): | ||
| 4 | Let define-derived-mode define it. | ||
| 5 | * emacs-lisp/derived.el (define-derived-mode): Try to avoid creating | ||
| 6 | cycles of abbrev-table inheritance (bug#8998). | ||
| 7 | |||
| 1 | 2011-07-05 Roland Winkler <winkler@gnu.org> | 8 | 2011-07-05 Roland Winkler <winkler@gnu.org> |
| 2 | 9 | ||
| 3 | * textmodes/bibtex.el: Add support for biblatex. | 10 | * textmodes/bibtex.el: Add support for biblatex. |
| @@ -10,15 +17,15 @@ | |||
| 10 | (bibtex-entry-alist, bibtex-field-alist): New widgets. | 17 | (bibtex-entry-alist, bibtex-field-alist): New widgets. |
| 11 | (bibtex-set-dialect): New command. | 18 | (bibtex-set-dialect): New command. |
| 12 | (bibtex-entry-type, bibtex-entry-head) | 19 | (bibtex-entry-type, bibtex-entry-head) |
| 13 | (bibtex-entry-maybe-empty-head, bibtex-any-valid-entry-type): Bind | 20 | (bibtex-entry-maybe-empty-head, bibtex-any-valid-entry-type): |
| 14 | via bibtex-set-dialect. | 21 | Bind via bibtex-set-dialect. |
| 15 | (bibtex-Article, bibtex-Book, bibtex-Booklet, bibtex-InBook) | 22 | (bibtex-Article, bibtex-Book, bibtex-Booklet, bibtex-InBook) |
| 16 | (bibtex-InCollection, bibtex-InProceedings, bibtex-Manual) | 23 | (bibtex-InCollection, bibtex-InProceedings, bibtex-Manual) |
| 17 | (bibtex-MastersThesis, bibtex-Misc, bibtex-PhdThesis) | 24 | (bibtex-MastersThesis, bibtex-Misc, bibtex-PhdThesis) |
| 18 | (bibtex-Proceedings, bibtex-TechReport, bibtex-Unpublished): | 25 | (bibtex-Proceedings, bibtex-TechReport, bibtex-Unpublished): |
| 19 | Define via bibtex-set-dialect. | 26 | Define via bibtex-set-dialect. |
| 20 | (bibtex-name-in-field, bibtex-remove-OPT-or-ALT): Obey | 27 | (bibtex-name-in-field, bibtex-remove-OPT-or-ALT): |
| 21 | bibtex-no-opt-remove-re. | 28 | Obey bibtex-no-opt-remove-re. |
| 22 | (bibtex-vec-push, bibtex-vec-incr): New functions. | 29 | (bibtex-vec-push, bibtex-vec-incr): New functions. |
| 23 | (bibtex-format-entry, bibtex-field-list) | 30 | (bibtex-format-entry, bibtex-field-list) |
| 24 | (bibtex-print-help-message, bibtex-validate) | 31 | (bibtex-print-help-message, bibtex-validate) |
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. | |||
| 255 | (not (eq parent (standard-syntax-table)))) | 255 | (not (eq parent (standard-syntax-table)))) |
| 256 | (set-char-table-parent ,syntax (syntax-table))))) | 256 | (set-char-table-parent ,syntax (syntax-table))))) |
| 257 | ,(when declare-abbrev | 257 | ,(when declare-abbrev |
| 258 | `(unless (abbrev-table-get ,abbrev :parents) | 258 | `(unless (or (abbrev-table-get ,abbrev :parents) |
| 259 | ;; This can happen if the major mode defines | ||
| 260 | ;; the abbrev-table to be its parent's. | ||
| 261 | (eq ,abbrev local-abbrev-table)) | ||
| 259 | (abbrev-table-put ,abbrev :parents | 262 | (abbrev-table-put ,abbrev :parents |
| 260 | (list local-abbrev-table)))))) | 263 | (list local-abbrev-table)))))) |
| 261 | (use-local-map ,map) | 264 | (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." | |||
| 525 | "Keymap for Lisp Interaction mode. | 525 | "Keymap for Lisp Interaction mode. |
| 526 | All commands in `lisp-mode-shared-map' are inherited by this map.") | 526 | All commands in `lisp-mode-shared-map' are inherited by this map.") |
| 527 | 527 | ||
| 528 | (defvar lisp-interaction-mode-abbrev-table lisp-mode-abbrev-table) | ||
| 529 | (define-derived-mode lisp-interaction-mode emacs-lisp-mode "Lisp Interaction" | 528 | (define-derived-mode lisp-interaction-mode emacs-lisp-mode "Lisp Interaction" |
| 530 | "Major mode for typing and evaluating Lisp forms. | 529 | "Major mode for typing and evaluating Lisp forms. |
| 531 | Like Lisp mode except that \\[eval-print-last-sexp] evals the Lisp expression | 530 | Like Lisp mode except that \\[eval-print-last-sexp] evals the Lisp expression |