From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: emacs18@gmail.com Newsgroups: gmane.emacs.bugs Subject: bug#8998: further analysis of the problem Date: Mon, 04 Jul 2011 20:50:32 -0700 Message-ID: References: Reply-To: emacs18@gmail.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1309837889 8399 80.91.229.12 (5 Jul 2011 03:51:29 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 5 Jul 2011 03:51:29 +0000 (UTC) To: 8998@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jul 05 05:51:25 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QdwfU-0003js-Qh for geb-bug-gnu-emacs@m.gmane.org; Tue, 05 Jul 2011 05:51:24 +0200 Original-Received: from localhost ([::1]:55585 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QdwfU-0003nk-1H for geb-bug-gnu-emacs@m.gmane.org; Mon, 04 Jul 2011 23:51:24 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:36040) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QdwfB-0003nI-8J for bug-gnu-emacs@gnu.org; Mon, 04 Jul 2011 23:51:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qdwf9-0002gl-Md for bug-gnu-emacs@gnu.org; Mon, 04 Jul 2011 23:51:04 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:39770) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qdwf9-0002gZ-AX for bug-gnu-emacs@gnu.org; Mon, 04 Jul 2011 23:51:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1Qdwf8-0001Ss-8L; Mon, 04 Jul 2011 23:51:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: Resent-From: Richard Kim Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 05 Jul 2011 03:51:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 8998 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 8998-submit@debbugs.gnu.org id=B8998.13098378425600 (code B ref 8998); Tue, 05 Jul 2011 03:51:02 +0000 Original-Received: (at 8998) by debbugs.gnu.org; 5 Jul 2011 03:50:42 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Qdwen-0001SH-JI for submit@debbugs.gnu.org; Mon, 04 Jul 2011 23:50:41 -0400 Original-Received: from mail-pz0-f44.google.com ([209.85.210.44]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Qdwel-0001S4-Oo for 8998@debbugs.gnu.org; Mon, 04 Jul 2011 23:50:40 -0400 Original-Received: by pzk5 with SMTP id 5so1122131pzk.3 for <8998@debbugs.gnu.org>; Mon, 04 Jul 2011 20:50:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:from:to:subject:reply-to:date:message-id:mime-version :content-type; bh=ckRPLOPu8kv5sXVqd1XzFLrs6PSFfuk0W7Ytv6wjHe0=; b=nBKoWqnn1AL+HaPaKp5przsU1nHdCY+4OkHHkh/GNenAr/hq2bpAfCp0bCJnwad69S lRvNKc7Z5LHrmIotMknn1zRniJzi0YQLlcgmHkZ7OoVoCrxTf84/xt+MljbT336N6fgK Pq/Usk95sbFkAE9p7GGuQZ/E6Q2wXiJGdTpuc= Original-Received: by 10.68.39.39 with SMTP id m7mr9419616pbk.54.1309837833765; Mon, 04 Jul 2011 20:50:33 -0700 (PDT) Original-Received: from kimr-laptop (static-50-53-5-59.bvtn.or.frontiernet.net [50.53.5.59]) by mx.google.com with ESMTPS id v9sm2273143pbm.31.2011.07.04.20.50.32 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 04 Jul 2011 20:50:33 -0700 (PDT) Original-From: Richard Kim X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Mon, 04 Jul 2011 23:51:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:48006 Archived-At: I did some further investigation and have more information to share. The recent change made in `define-derived-mode' adds :parents abbrev property to the derived mode's abbrev table, e.g., `lisp-interaction-mode-abbrev-table'. Unfortunately this results in cyclic data where :parent abbrev property of lisp-interaction-mode-abbrev-table is itself, i.e., the following is true: (eq lisp-interaction-mode-abbrev-table (car (abbrev-table-get lisp-interaction-mode-abbrev-table :parents))) This cyclic relationship (i.e., being its own parent) causes infinite loop within `abbrev-symbol' which has code similar to this: (while tables (setq table (pop tables)) (setq tables (append (abbrev-table-get table :parents) tables)) ...) This loop within `abbrev-symbol' in conjunction with lisp-interaction-mode-abbrev-table being its own parent causes the infinite loop. Why is `lisp-interaction-mode-abbrev-table' its own parent? I think the answer is that the following items have something to do with it. A. lisp-interaction-mode and emacs-lisp-mode are both defined via define-derived-mode macro. B. Both modes call `lisp-mode-variables' utility function which sets local-abbrev-table. C. define-derived-mode macro uses local-abbrev-table as the value of parent *before* setting it, i.e., it uses the value of local-abbrev-table (whatever it is) as the parent! I hope this helps.