From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Herman@debbugs.gnu.org, =?UTF-8?Q?G=C3=A9za?= Newsgroups: gmane.emacs.bugs Subject: bug#45375: cc-mode indentation sometimes doesn't work Date: Wed, 23 Dec 2020 00:02:17 +0100 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40792"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.1 To: 45375@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Dec 23 00:03:21 2020 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 1krqgb-000AW2-G7 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 23 Dec 2020 00:03:21 +0100 Original-Received: from localhost ([::1]:56314 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1krqga-0007uC-18 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 22 Dec 2020 18:03:20 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58840) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1krqgL-0007tc-U6 for bug-gnu-emacs@gnu.org; Tue, 22 Dec 2020 18:03:06 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:39613) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1krqgI-0001vp-DW for bug-gnu-emacs@gnu.org; Tue, 22 Dec 2020 18:03:05 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1krqgI-0007S8-B9 for bug-gnu-emacs@gnu.org; Tue, 22 Dec 2020 18:03:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Herman@debbugs.gnu.org, =?UTF-8?Q?G=C3=A9za?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 22 Dec 2020 23:03:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 45375 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.160867814928603 (code B ref -1); Tue, 22 Dec 2020 23:03:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 22 Dec 2020 23:02:29 +0000 Original-Received: from localhost ([127.0.0.1]:51159 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1krqfk-0007RG-P5 for submit@debbugs.gnu.org; Tue, 22 Dec 2020 18:02:28 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:50454) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1krqfh-0007R6-Gh for submit@debbugs.gnu.org; Tue, 22 Dec 2020 18:02:27 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58678) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1krqff-0007p1-Qz for bug-gnu-emacs@gnu.org; Tue, 22 Dec 2020 18:02:25 -0500 Original-Received: from mail-ej1-x629.google.com ([2a00:1450:4864:20::629]:38399) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1krqfd-0001jY-5J for bug-gnu-emacs@gnu.org; Tue, 22 Dec 2020 18:02:23 -0500 Original-Received: by mail-ej1-x629.google.com with SMTP id 6so20371705ejz.5 for ; Tue, 22 Dec 2020 15:02:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=to:from:subject:message-id:date:user-agent:mime-version :content-transfer-encoding:content-language; bh=tqCB6gDxSjfi8xbeRvIWcQtv/dT7Por7J8BwUet9m58=; b=CIrIuxO/DtQmFDXga8PO2V8f6tg2nPVt/NWi6S7hLwHRbE6gM/ghRxd1O7kOpwTvzX fn9k00BVJy49wLFtzgfjKZFugklCQmsYi28CXoVqE6l9/jsM4ydqokDJ8Q8WXjlXjirt +mw2zplktgqNObPppNZYtIDs2bnvFhHZtXDA2cpkS7NnJK3c52nrvmraJS0FGokkRtAg HBQywK9xaMQCMglbgHGOKnMrQDR4Y4U6+CBB8Q2pH8LYROBdi7JcfxXExxxBIcHL9WL2 xGMwFgh66V9byCbt9KbJ7tgPRK/N9WgQt1SmR2+MlgT7wTLV0Ho4vlnnUn+jggEPKBNj jKuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:from:subject:message-id:date:user-agent :mime-version:content-transfer-encoding:content-language; bh=tqCB6gDxSjfi8xbeRvIWcQtv/dT7Por7J8BwUet9m58=; b=b1d2YxXaV/Tn9M6VrhC3ey+wQ1cPYtManLMcIOeG4RPjPocNI9MsOt5n+amE7fhWeZ E8aunORBtK3UVK40MUF+P35blCO0sQfGrzwirOr0rWfrGW8wqc43DNgaM2RUmC8ZIzSf ALZewr8UpGvObQ2c5iWQ3rIMGL+h1dzVhO4JEkOe/XuhiCDyV8TCn3eWVF17VarGp2NP IkAytp34gZjKswQjXumpBBuffPluS75doGdmlGDG2d2GWikXNATHciRyztprE1ris4Hk FcI5mIwVVuXblZNngy/+ejlZJ9KMN8rCWV9Bo3r1WYLEWxtYk75ZZqIjggwHdJj1Hwlc oB2g== X-Gm-Message-State: AOAM531w8UcRBNbdeurgQlasU1mlHV3ygQgpruiFNBKSAYqQ9Tw7v8mw jJckkq7doeF+YIlQ0sVft4s= X-Google-Smtp-Source: ABdhPJz9I17iO4X2YHV+wppFukDjZAXDFXwfYQESZ/9oKxPzHkPVP/WnhvoLTk6B5fzSaQJqxNXkuQ== X-Received: by 2002:a17:907:1009:: with SMTP id ox9mr21765276ejb.37.1608678139029; Tue, 22 Dec 2020 15:02:19 -0800 (PST) Original-Received: from [192.168.8.4] (netacc-gpn-34-122-8.pool.telenor.hu. [37.234.122.8]) by smtp.gmail.com with ESMTPSA id v18sm29915324edx.30.2020.12.22.15.02.17 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 22 Dec 2020 15:02:18 -0800 (PST) Content-Language: sv-FI Received-SPF: pass client-ip=2a00:1450:4864:20::629; envelope-from=geza.herman@gmail.com; helo=mail-ej1-x629.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:196593 Archived-At: 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." introduced this behavior. This is how to reproduce: check out 9022df70270243f211c54ccd66800320148b8434, 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 placed 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_end (ap);". I'm not sure whether this exact steps reproduces for everyone, but 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 function lines. But it will happen for somewhere else, if I keep trying (move around 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.