From campbell@mumble.net Sun Nov 1 15:09:51 2009 Received: (at submit) by emacsbugs.donarmstrong.com; 1 Nov 2009 23:09:51 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=0.3 required=4.0 tests=AWL,MURPHY_SEX_L2 autolearn=no version=3.2.5-bugs.debian.org_2005_01_02 Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nA1N9nbU015105 for ; Sun, 1 Nov 2009 15:09:51 -0800 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N4jYT-0005Dj-MU for bug-gnu-emacs@gnu.org; Sun, 01 Nov 2009 18:09:49 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N4jYP-0005Cw-3a for bug-gnu-emacs@gnu.org; Sun, 01 Nov 2009 18:09:49 -0500 Received: from [199.232.76.173] (port=36349 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N4jYO-0005Ct-UG for bug-gnu-emacs@gnu.org; Sun, 01 Nov 2009 18:09:44 -0500 Received: from pluto.mumble.net ([206.123.75.20]:55476) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1N4jYO-0006zE-Hi for bug-gnu-emacs@gnu.org; Sun, 01 Nov 2009 18:09:44 -0500 Received: from localhost.localdomain (localhost [127.0.0.1]) by pluto.mumble.net (Postfix) with ESMTP id 4D25D98290; Sun, 1 Nov 2009 23:09:42 +0000 (UTC) To: bug-gnu-emacs@gnu.org Subject: C++ Mode mistreats < and > as balanced delimiters Date: Sun, 1 Nov 2009 18:09:41 -0500 From: Taylor R Campbell User-Agent: IMAIL/1.21; Edwin/3.116; MIT-Scheme/7.7.90.+ MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Message-Id: <20091101230942.4D25D98290@pluto.mumble.net> X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) GNU Emacs 22.3.1 (i386-apple-darwin9.7.0, GTK+ Version 2.12.9) of 2009-08-1= 0 on Oberon.local In an empty buffer in C++ Mode, type if (foo < bar) { } and then change it to if (foo < > bar) { } and then change it back. Now your buffer is in a bogus state, with Emacs thinking that the < is mismatched with the ), and that there is nothing matching the (. It is OK not to treat angle brackets as delimiters when they are, in templates: it requires a little extra work by the user (to see, edit, indent, &c., the balanced pairs), but doesn't break anything. It is not OK to treat angle brackets as delimiters when they aren't, in comparisons and shifts: it breaks the entire structure of the text in the buffer, and thus it breaks swaths of commands that users use all the time without thinking such as C-M-f and C-M-b. If Emacs has the option of being clever about angle brackets in templates, the user should have the option of disabling it because it is incredibly frustrating when the cleverness fails. But I couldn't find any way to disable this broken cleverness, by aproposing for `C++', by reading the CC Mode manual, or by skimming the (unbelievably hairy) code. I even tried to fool C++ Mode by changing the entries for ?< and ?> in c++-mode-syntax-table, which didn't help because that's not where the guilty entries are; by changing c++-template-syntax-table, which didn't help because it is not globally defined and apparently regenerated for each instance of C++ Mode; and by adding a hook to c++-mode-hook which changes c++-template-syntax-table, which still didn't work, at which point I lost interest in trying to figure out this mess. So it seems as though C++ Mode takes special effort to thwart any attempts to work around its broken cleverness surrounding angle brackets. From rgm@gnu.org Wed Nov 4 09:43:40 2009 Received: (at control) by emacsbugs.donarmstrong.com; 4 Nov 2009 17:43:41 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-2.8 required=4.0 tests=AWL,ONEWORD autolearn=no version=3.2.5-bugs.debian.org_2005_01_02 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nA4HhdZp002300 for ; Wed, 4 Nov 2009 09:43:40 -0800 Received: from rgm by fencepost.gnu.org with local (Exim 4.67) (envelope-from ) id 1N5jtS-0006JL-LO; Wed, 04 Nov 2009 12:43:38 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <19185.48458.601682.732332@fencepost.gnu.org> Date: Wed, 4 Nov 2009 12:43:38 -0500 From: Glenn Morris To: control Subject: control merge 4526 4846 severity 4839 minor tags 4838 moreinfo reassign 4840 emacs,ns reassign 4847 emacs,cc-mode unarchive 4122 forcemerge 4122 4866 reassign 4864 spam reassign 4865 spam From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 03 15:10:39 2011 Received: (at 4847-done) by debbugs.gnu.org; 3 Oct 2011 19:10:39 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RAnuQ-0008UX-P6 for submit@debbugs.gnu.org; Mon, 03 Oct 2011 15:10:39 -0400 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RAnuJ-0008UL-Sh for 4847-done@debbugs.gnu.org; Mon, 03 Oct 2011 15:10:36 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1RAnsw-0007B2-Jp; Mon, 03 Oct 2011 15:09:06 -0400 From: Glenn Morris To: 4847-done@debbugs.gnu.org Subject: Re: bug#4847: C++ Mode mistreats < and > as balanced delimiters References: <20091101230942.4D25D98290@pluto.mumble.net> X-Spook: Blowpipe mindwar INSCOM Mole Reno Operation Iraqi Freedom X-Ran: 8d:4?L?m:Ko^?IWr{AS?|v\#`O6nzRJC|]:DgS!;#2wl9Fe+N4d~rp(TvBfbObrvU*cf[J X-Hue: cyan X-Attribution: GM Date: Mon, 03 Oct 2011 15:09:06 -0400 In-Reply-To: <20091101230942.4D25D98290@pluto.mumble.net> (Taylor R. Campbell's message of "Sun, 1 Nov 2009 18:09:41 -0500") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -6.4 (------) X-Debbugs-Envelope-To: 4847-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.4 (------) Version: 24.1 I see this problem in Emacs 23.3, but not in the current trunk, so it looks like it has been fixed. From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 03 15:12:53 2011 Received: (at control) by debbugs.gnu.org; 3 Oct 2011 19:12:53 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RAnwa-00006I-Nl for submit@debbugs.gnu.org; Mon, 03 Oct 2011 15:12:53 -0400 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RAnwY-00006B-UH for control@debbugs.gnu.org; Mon, 03 Oct 2011 15:12:51 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1RAnvB-0007Lo-U1 for control@debbugs.gnu.org; Mon, 03 Oct 2011 15:11:26 -0400 Date: Mon, 03 Oct 2011 15:11:25 -0400 Message-Id: Subject: control message for bug 4984 To: X-Mailer: mail (GNU Mailutils 2.1) From: Glenn Morris X-Spam-Score: -6.4 (------) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.4 (------) forcemerge 4847 4984 From unknown Fri Aug 15 18:53:41 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 01 Nov 2011 11:24:02 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator