From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#7814: Fwd: debugger entered on c-electric-paren Date: Wed, 12 Jan 2011 19:35:22 +0000 Message-ID: <20110112193522.GA3782@muc.de> References: <20101019003622.8048.57233.malonedeb@palladium.canonical.com> <20101019003622.8048.57233.malonedeb@palladium.canonical.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1294860271 17758 80.91.229.12 (12 Jan 2011 19:24:31 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 12 Jan 2011 19:24:31 +0000 (UTC) Cc: 7814@debbugs.gnu.org To: Adam Fineman Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jan 12 20:24:27 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Pd6J0-0006We-7G for geb-bug-gnu-emacs@m.gmane.org; Wed, 12 Jan 2011 20:24:26 +0100 Original-Received: from localhost ([127.0.0.1]:33975 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pd6Iz-0002c5-Hq for geb-bug-gnu-emacs@m.gmane.org; Wed, 12 Jan 2011 14:24:25 -0500 Original-Received: from [140.186.70.92] (port=44694 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pd6Ir-0002b7-54 for bug-gnu-emacs@gnu.org; Wed, 12 Jan 2011 14:24:18 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pd6Ip-0001tC-Np for bug-gnu-emacs@gnu.org; Wed, 12 Jan 2011 14:24:17 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:52430) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pd6Ip-0001t7-L0 for bug-gnu-emacs@gnu.org; Wed, 12 Jan 2011 14:24:15 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1Pd67x-0004Co-Jn; Wed, 12 Jan 2011 14:13:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 12 Jan 2011 19:13:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 7814 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 7814-submit@debbugs.gnu.org id=B7814.129485956816145 (code B ref 7814); Wed, 12 Jan 2011 19:13:01 +0000 Original-Received: (at 7814) by debbugs.gnu.org; 12 Jan 2011 19:12:48 +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 1Pd67j-0004CM-TO for submit@debbugs.gnu.org; Wed, 12 Jan 2011 14:12:48 -0500 Original-Received: from colin.muc.de ([193.149.48.1] helo=mail.muc.de) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Pd67h-0004C8-BC for 7814@debbugs.gnu.org; Wed, 12 Jan 2011 14:12:46 -0500 Original-Received: (qmail 8450 invoked by uid 3782); 12 Jan 2011 19:20:15 -0000 Original-Received: from acm.muc.de (pD9E5283D.dip.t-dialin.net [217.229.40.61]) by colin2.muc.de (tmda-ofmipd) with ESMTP; Wed, 12 Jan 2011 20:20:13 +0100 Original-Received: (qmail 4168 invoked by uid 1000); 12 Jan 2011 19:35:23 -0000 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.9i X-Delivery-Agent: TMDA/1.1.5 (Fettercairn) X-Primary-Address: acm@muc.de X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Wed, 12 Jan 2011 14:13:01 -0500 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:43311 Archived-At: Hi, Adam, thanks for the bug report! On Mon, Jan 10, 2011 at 06:45:08AM -0500, Adam Fineman wrote: > As you'll see in the forwarded message below, I originally filed this bug > with the nxhtml team, and they asked me to file it against Emacs. > Entering the same file as below, I still see a backtrace at the same place, > although the trace is slightly different: > ------------------------ > Debugger entered--Lisp error: (wrong-type-argument listp set-from-style) > c-electric-paren(nil) > call-interactively(c-electric-paren nil nil) > ------------------------ The value `set-from-style' is the uninitialised "global" value that CC Mode gives certain variables ("style variables"). That a buffer's copy of a variable still contains that value implies that nxhtml-mode has failed to initialise CC Mode properly. > This is the version of nxhtml that I installed: > http://ourcomments.org/Emacs/DL/elisp/nxhtml/zip/nxhtml-2.08-100425.zip I've downloaded that and grepped it. There are no CC Mode initialisation calls in php-mode.el. For comparison, there are three such calls in csharp-mode.el, namely: (c-initialize-cc-mode t) (c-init-language-vars csharp-mode) (c-common-init 'csharp-mode) C#'s initialisation is probably correct, and could serve as a model for PHP Mode. In particular the call to `c-common-init' is the essential one. I don't have an account on Launchpad, and I really don't want to "read the guide" or "take a tour" (I've got bugs to fix ;-), so I won't be contributing to the bug's progress on Launchpad. If nxhtml-mode's maintainer wants to contact me, I'd be happy for him/her to email me personally or on the CC Mode mailing list at bug-cc-mode@gnu.org. Thanks once again for taking the trouble to submit such a clear bug report. > - Adam > ---------- Forwarded message ---------- > From: Adam Fineman <663041@bugs.launchpad.net> > Date: Mon, Oct 18, 2010 at 8:36 PM > Subject: [Bug 663041] [NEW] debugger entered on c-electric-paren > To: afineman@afineman.com > I open a new file '/tmp/foo.php' and start typing the following: > ============= > > > foo > > > ============= > As soon as I type the '(' character, I get a backtrace: > =========== > Debugger entered--Lisp error: (wrong-type-argument listp set-from-style) > c-electric-paren(nil) > call-interactively(c-electric-paren) > =========== > This is a clean build of emacs-23.2, on Ubuntu Server 8.04.4. -- Alan Mackenzie (Nuremberg, Germany). Maintainer of CC Mode.