From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "Basil L. Contovounesios" Newsgroups: gmane.emacs.bugs Subject: bug#45375: cc-mode indentation sometimes doesn't work Date: Fri, 12 Feb 2021 21:17:56 +0000 Message-ID: <87r1ll9e9n.fsf@tcd.ie> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13449"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Alan Mackenzie , 45375@debbugs.gnu.org To: =?UTF-8?Q?G=C3=A9za?= Herman Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Feb 12 22:19:14 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lAfqL-0003KQ-Mi for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 12 Feb 2021 22:19:13 +0100 Original-Received: from localhost ([::1]:41882 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lAfqK-0005uP-O5 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 12 Feb 2021 16:19:12 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42210) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lAfqA-0005rA-3O for bug-gnu-emacs@gnu.org; Fri, 12 Feb 2021 16:19:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49814) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lAfq9-0005KO-Qy for bug-gnu-emacs@gnu.org; Fri, 12 Feb 2021 16:19:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lAfq9-0005nz-Jf for bug-gnu-emacs@gnu.org; Fri, 12 Feb 2021 16:19:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: "Basil L. Contovounesios" Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 12 Feb 2021 21:19:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45375 X-GNU-PR-Package: emacs Original-Received: via spool by 45375-submit@debbugs.gnu.org id=B45375.161316468822242 (code B ref 45375); Fri, 12 Feb 2021 21:19:01 +0000 Original-Received: (at 45375) by debbugs.gnu.org; 12 Feb 2021 21:18:08 +0000 Original-Received: from localhost ([127.0.0.1]:33124 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lAfpI-0005mf-2M for submit@debbugs.gnu.org; Fri, 12 Feb 2021 16:18:08 -0500 Original-Received: from mail-wr1-f52.google.com ([209.85.221.52]:36967) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lAfpF-0005mA-9K for 45375@debbugs.gnu.org; Fri, 12 Feb 2021 16:18:07 -0500 Original-Received: by mail-wr1-f52.google.com with SMTP id v15so883272wrx.4 for <45375@debbugs.gnu.org>; Fri, 12 Feb 2021 13:18:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd.ie; s=google21; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=NsUDs+Y5dswlPrhftqqV4b3OVU7VQd097tiUS7z2kBM=; b=O4TqB+IPqEtbsY4P5Tz5rk0b7iZP643hJPcpPaUk3ws4l05F2Ff0DIO2md0ov2+omj Mgn2dGcZCW8/rbBlxwYTSE3FN5rqumQC8x8+jLLFzVf7MBbj4vxvgau7nOi1qE2yA3A3 ePIbi8hM303Yah5MN3u6v3VOGxuCL61XeACGZPzv0/+YMWfWqXXpP704UvW9WUdxftRk HybCCCzHnO53dCMKjwIL54bqVmp+gC3zfqRAhZbqNYUtCVH1Z7Sxa0+oFIc4O2XQpTPB EdFw4b8SnOt74FZAIIGPLBLsZB5k0dRuQL8Cj6ZKdpuy/r1VI5jbGQXVJivISRSfcDqg qNlw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=NsUDs+Y5dswlPrhftqqV4b3OVU7VQd097tiUS7z2kBM=; b=bJ+JhLYutUarC9ZO70QFEtpTm0YloqxKoippgZzQ3mLCcvo6nmrjnxKXcoZYb9E+Zw 8K+NEf6ObhEAQNzYqZZazr8GTzlQLB70p0/+qOeMfA1f1SMwdS9EujdaNUSYjYTC3EU5 WVf7H+cf2sdBsYcRHs+chxfaSpV0gMRgYGCbhKh5Xi9VQa9sXn1M5L3Uy70SqHq9QPgg vlDVMlEw+ajc6ZXwnJ0SdCW997p9K36ehXlT6xS12SmJR6WyGo7BEdu0exTwJpL3S4GM /rjIEJIHLTQk3UcvVdXOmDWUl69Apkh6aEc7QSHyJ3W351pnrII5e6U1oXpUdin4EcKt AZnw== X-Gm-Message-State: AOAM531gIcGUA3o+abGSCkFmtjdfqLQAW8CYn++CakVatf7L5ombuQKv Xg2yLnocttdQYnlABFzMwk+yuA== X-Google-Smtp-Source: ABdhPJx1/Wj0XPBmkruzPuKrl4XVIxTp0Kl2/5gwTyD5bbvb9KdwDajq3hB1TKsl7b1a8q2iwMCnZw== X-Received: by 2002:adf:e988:: with SMTP id h8mr4179956wrm.2.1613164679375; Fri, 12 Feb 2021 13:17:59 -0800 (PST) Original-Received: from localhost ([2a02:8084:20e2:c380:f410:82e8:3a21:eedf]) by smtp.gmail.com with ESMTPSA id i10sm14687435wrp.0.2021.02.12.13.17.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Feb 2021 13:17:58 -0800 (PST) In-Reply-To: ("Herman@debbugs.gnu.org, =?UTF-8?Q?G=C3=A9za?="'s message of "Wed, 23 Dec 2020 00:02:17 +0100") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:199885 Archived-At: reassign 45375 emacs,cc-mode quit [CCed CC Mode maintainer.] Herman@debbugs.gnu.org, G=C3=A9za writes: > On current master (6af31fd71ff1a403c199c479577bcc145a547db1) indentation = of > C/C++ files sometimes doesn't work. I've bisected it: commit "9022df7027 > Optimise c-parse-state for large buffers with few (if any) braces." intro= duced > this behavior. > > This is how to reproduce: check out 9022df70270243f211c54ccd66800320148b8= 434, > and execute "emacs -Q xdisp.c". Jump to line 2989 with M-g M-g 2989, move= the > cursor to the end of line of "Lisp_Object retval;", and press enter. The = cursor > will be moved to the correct place (correctly indented, cursor will be pl= aced > below the 'L' character of the previous line). Then push enter at end of = line of > "va_list ap;". For me, cursor will jump to the beginning of the line, it = won't > be indented. If I keep pressing enters, the next failure will be at "va_e= nd > (ap);". I'm not sure whether this exact steps reproduces for everyone, bu= t it > happened me 5 of 5 trials. If I don't press enter at the first line > ("Lisp_Object retval;"), the problem doesn't happen for any of this funct= ion > lines. But it will happen for somewhere else, if I keep trying (move arou= nd the > file, press enter at random places: if will fail sooner or later). > > For my configuration (without -Q), this problem happens quite frequently = during > editing C++ code. I tried following your recipe (the lines in xdisp.c have since moved around a bit), but was unable to reproduce the issue. Can you still reproduce it on your end? Thanks, --=20 Basil