bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#8998: further analysis of the problem


From: Stefan Monnier
Subject: bug#8998: further analysis of the problem
Date: Tue, 05 Jul 2011 14:28:43 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

> Why is `lisp-interaction-mode-abbrev-table' its own parent?

I've installed the patch below which I believe fixes the problem.
Can you confirm that it fixes the problem for you?


        Stefan


=== modified file 'lisp/emacs-lisp/derived.el'
--- lisp/emacs-lisp/derived.el  2011-07-01 16:41:02 +0000
+++ lisp/emacs-lisp/derived.el  2011-07-05 18:23:08 +0000
@@ -255,7 +255,10 @@
                                   (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)

=== modified file 'lisp/emacs-lisp/lisp-mode.el'
--- lisp/emacs-lisp/lisp-mode.el        2011-06-28 12:09:43 +0000
+++ lisp/emacs-lisp/lisp-mode.el        2011-07-05 16:14:45 +0000
@@ -525,7 +525,6 @@
   "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






reply via email to

[Prev in Thread] Current Thread [Next in Thread]