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#22884: 25.0.92; C/l mode editing takes waaaayy too long Date: Thu, 3 Mar 2016 12:49:10 +0000 Message-ID: <20160303124910.GA2852@acm.fritz.box> References: <56D72C35.4090708@cs.ucla.edu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1457009244 28342 80.91.229.3 (3 Mar 2016 12:47:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 3 Mar 2016 12:47:24 +0000 (UTC) Cc: 22884@debbugs.gnu.org To: Paul Eggert Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Mar 03 13:47:13 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1abSeu-00037j-Ly for geb-bug-gnu-emacs@m.gmane.org; Thu, 03 Mar 2016 13:47:12 +0100 Original-Received: from localhost ([::1]:34721 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1abSet-0006Pg-VF for geb-bug-gnu-emacs@m.gmane.org; Thu, 03 Mar 2016 07:47:11 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42391) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1abSeq-0006PZ-Nb for bug-gnu-emacs@gnu.org; Thu, 03 Mar 2016 07:47:09 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1abSep-0007Bk-PU for bug-gnu-emacs@gnu.org; Thu, 03 Mar 2016 07:47:08 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:33334) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1abSek-0007BE-31; Thu, 03 Mar 2016 07:47:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1abSej-0006Pe-Pr; Thu, 03 Mar 2016 07:47:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bug-cc-mode@gnu.org Resent-Date: Thu, 03 Mar 2016 12:47:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22884 X-GNU-PR-Package: emacs,cc-mode X-GNU-PR-Keywords: Original-Received: via spool by 22884-submit@debbugs.gnu.org id=B22884.145700920324626 (code B ref 22884); Thu, 03 Mar 2016 12:47:01 +0000 Original-Received: (at 22884) by debbugs.gnu.org; 3 Mar 2016 12:46:43 +0000 Original-Received: from localhost ([127.0.0.1]:58694 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1abSeR-0006P8-B3 for submit@debbugs.gnu.org; Thu, 03 Mar 2016 07:46:43 -0500 Original-Received: from mail.muc.de ([193.149.48.3]:33543) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1abSeP-0006Ox-70 for 22884@debbugs.gnu.org; Thu, 03 Mar 2016 07:46:41 -0500 Original-Received: (qmail 57002 invoked by uid 3782); 3 Mar 2016 12:46:39 -0000 Original-Received: from acm.muc.de (p579E89EE.dip0.t-ipconnect.de [87.158.137.238]) by colin.muc.de (tmda-ofmipd) with ESMTP; Thu, 03 Mar 2016 13:46:38 +0100 Original-Received: (qmail 2946 invoked by uid 1000); 3 Mar 2016 12:49:10 -0000 Content-Disposition: inline In-Reply-To: <56D72C35.4090708@cs.ucla.edu> User-Agent: Mutt/1.5.24 (2015-08-30) X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.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:114343 Archived-At: Hello, Paul. On Wed, Mar 02, 2016 at 10:08:53AM -0800, Paul Eggert wrote: > I've been noticing this problem for a bit and figured it'd get fixed but > it hasn't so here is a bug report. > With the Emacs 25 pretests, it takes waaaaayyy too long to edit some C > code. To reproduce the problem use the attached file (taken from the > Emacs source code) and run: > emacs -Q config.h > M-x goto-line RET 1661 RET / / > On my six-year-old desktop the second '/' takes about 10 seconds to > echo. This sort of thing makes Emacs effectively unusable for editing > config.h. The problem is in config.h. At line 14, inside a comment, appears the following string: "(at your option) any later version." . The open paren is at column zero, so the fancy code in syntax.c then fails to recognise the comment as a comment. CC Mode is then effectively communicating across the continent between L1661 and L14 by carrier pigeon in the belief that there is non-syntactic-ws code at L14. (Syntactic whitespace includes comments and preprocessor constructs.) Inserting a backslash at the beginning of L14 solves the problem, as does setting open-paren-in-column-0-is-defun-start to nil. The next problem is that there are around 324 occurrences of "(" at column zero in the src directory, and quite a few in lib and lib-src. Most of them are in comments, some of them are parameter lists, and some of them (e.g. in lisp.h) are wierd constructs of some sort. These contravene GNU coding standards and really need sorting out. > In GNU Emacs 25.0.92.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.18.7) > of 2016-03-02 built on penguin.cs.ucla.edu > Repository revision: 100346aa226e4eacc56f390c099bb9aab585b5f4 > Windowing system distributor 'Fedora Project', version 11.0.11800000 > Configured using: > 'configure --enable-gcc-warnings' -- Alan Mackenzie (Nuremberg, Germany).