From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: [christensenthomas@gmail.com: C indentation (problem)] Date: 19 Mar 2007 21:08:20 +0100 Message-ID: <20070319212605.GA2077@muc.de> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1174334915 2394 80.91.229.12 (19 Mar 2007 20:08:35 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 19 Mar 2007 20:08:35 +0000 (UTC) Cc: bug-cc-mode@gnu.org, emacs-devel@gnu.org To: Thomas Christensen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Mar 19 21:08:32 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HTO9e-0005az-Aw for ged-emacs-devel@m.gmane.org; Mon, 19 Mar 2007 21:08:30 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HTOB8-00041N-1E for ged-emacs-devel@m.gmane.org; Mon, 19 Mar 2007 15:10:02 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HTOB4-00040y-Dz for emacs-devel@gnu.org; Mon, 19 Mar 2007 16:09:58 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HTOB3-00040m-SC for emacs-devel@gnu.org; Mon, 19 Mar 2007 16:09:58 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HTOB3-00040j-L8 for emacs-devel@gnu.org; Mon, 19 Mar 2007 15:09:57 -0500 Original-Received: from colin.muc.de ([193.149.48.1] helo=mail.muc.de) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1HTO9Y-0002p0-LV for emacs-devel@gnu.org; Mon, 19 Mar 2007 16:08:25 -0400 Original-Received: (qmail 76957 invoked by uid 3782); 19 Mar 2007 20:08:20 -0000 Original-Received: from acm.muc.de (p54A3F7E2.dip.t-dialin.net [84.163.247.226]) by colin2.muc.de (tmda-ofmipd) with ESMTP; Mon, 19 Mar 2007 21:08:17 +0100 Original-Received: (qmail 3145 invoked by uid 1000); 19 Mar 2007 21:26:05 -0000 Original-Date: Mon, 19 Mar 2007 21:26:05 +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-detected-kernel: FreeBSD 4.6-4.9 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:68116 Archived-At: Hi, Thomas! On Mon, Mar 19, 2007 at 01:14:54AM -0400, Richard Stallman wrote: > Would someone please DTRT and ack? You wrote: > In the emacs pretest I have indentation problems running php-mode. > The indentation breaks if I put in a php opening tag, otherwise it > works fine. I have tracked the source of the problem to the new c-mode > which php-mode inherits. Could you do a few things to help me diagnose this, please: (i) Tell me about this PHP Mode. Where do I find the PHP Mode that you are using? Who maintains it? (Yourself, perhaps?) It doesn't seem to be part of Emacs 22 itself. The information you've posted says "Major mode: C/l", which isn't "PHP Mode". How does php-mode work, here? [Note: I don't know PHP, so be gentle on me, please!] (ii) You say: > The indentation breaks if I put in a php opening tag, otherwise it > works fine. I have tracked the source of the problem to the new c-mode > which php-mode inherits. Could you be more specific about what you've found here, please. What exactly have you found C Mode doing? What version of CC Mode were you using before which seemed to work all right? (iii) Could you post a dump of CC Mode's configuration. You get this with C-c C-b (or M-x c-submit-bug-report). You say: > This is the indentation in c-mode (it is the same in php-mode): > > void foo() { > bar(); > } > ?> In that little code snippet, could you please do C-u C-c C-s on each line, to dump CC Mode's idea of each line's syntax, then post the results. > I am not sure if it's a bug or the ancient php-mode just needs to > accommodate for the new emacs. "<" and ">" are nasty tokens in C-like languages. They can appear as "i < 10", "#include " and in C++ templates. It could be that the PHP "