From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: "Daniel Colascione" Newsgroups: gmane.emacs.bugs Subject: bug#41809: c-context-line-break incorrect after comments: cache issue? Date: Thu, 11 Jun 2020 09:09:17 -0700 Message-ID: <0bc193e74adca0ff2fea88aae374330b.squirrel@dancol.org> Mime-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="82130"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: SquirrelMail/1.4.23 [SVN] Cc: acm@muc.de To: 41809@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jun 11 18:16:52 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 1jjPso-000LFv-Un for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 11 Jun 2020 18:16:51 +0200 Original-Received: from localhost ([::1]:53430 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jjPsn-0001gu-7r for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 11 Jun 2020 12:16:49 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49574) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jjPmF-00078Q-Ig for bug-gnu-emacs@gnu.org; Thu, 11 Jun 2020 12:10:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:54547) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jjPmE-0002QI-Rx for bug-gnu-emacs@gnu.org; Thu, 11 Jun 2020 12:10:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jjPmE-0000cC-Mo for bug-gnu-emacs@gnu.org; Thu, 11 Jun 2020 12:10:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: "Daniel Colascione" Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 11 Jun 2020 16:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 41809 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.15918917692312 (code B ref -1); Thu, 11 Jun 2020 16:10:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 11 Jun 2020 16:09:29 +0000 Original-Received: from localhost ([127.0.0.1]:37860 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jjPlg-0000bE-RD for submit@debbugs.gnu.org; Thu, 11 Jun 2020 12:09:28 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:59114) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jjPlf-0000b7-PK for submit@debbugs.gnu.org; Thu, 11 Jun 2020 12:09:28 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48832) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jjPlf-0005tQ-IJ for bug-gnu-emacs@gnu.org; Thu, 11 Jun 2020 12:09:27 -0400 Original-Received: from dancol.org ([2600:3c01::f03c:91ff:fedf:adf3]:45088) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jjPlc-0002Ce-In for bug-gnu-emacs@gnu.org; Thu, 11 Jun 2020 12:09:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=dancol.org; s=x; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:To:From: Subject:Date:Message-ID:Sender:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=JLdK9iQGmU9PPJCE8jxLkdKd5SnzEgcr18WVO9P7XpI=; b=GqkYXKHvhsD8Th7ZZuH7+hBYJD R78m9ptnrBxeiQlCmvnnCRxoNF5wCtJ/NyKNeZsUZm4Vh1k8+J1UIsVwd0orEydLJwW0Ei9Tnve5m wT+vNV1SaLCaXDnLi3qMUtMXVigXXoCon5fKFX2DdJn8zz+D7KwDmVHYazMs+VIaQ//UI9Uc4p7bs v0ux9kUHQ051zoMAQoahS2XQoRi9RWbCFuPtXua4U+1QTwPC1E4Jj4iJ5d1PrRYnJD9ljC7f2hPty FxgZcmWh5E9E4my0Oo2v2Ea4YaTEXUi65l/eFSS895xNd+uXYMRcQMwRuzMKerolm8vFkTCtfMSrU yJtoaQwg==; Original-Received: from localhost ([127.0.0.1] helo=dancol.org) by dancol.org with esmtp (Exim 4.89) (envelope-from ) id 1jjPlV-00030S-Fi; Thu, 11 Jun 2020 09:09:17 -0700 Original-Received: from 127.0.0.1 (SquirrelMail authenticated user dancol) by dancol.org with HTTP; Thu, 11 Jun 2020 09:09:17 -0700 X-Priority: 3 (Normal) Importance: Normal Received-SPF: pass client-ip=2600:3c01::f03c:91ff:fedf:adf3; envelope-from=dancol@dancol.org; helo=dancol.org X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: 12 X-Spam_score: 1.2 X-Spam_bar: + X-Spam_report: (1.2 / 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, RCVD_IN_SBL_CSS=3.335, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN 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:181858 Archived-At: c-context-line-break sometimes incorrectly extends a comment when invoked immediately after the end of a comment. To repro: emacs -Q --eval '(progn (c-mode) (insert "/*foo*/") (backward-char) (c-context-line-break) (delete-char -2) (end-of-line) (c-context-line-break))' The second c-context-line-break occurs when point is *after* the comment, so the /*foo*/ comment shouldn't be extended --- yet it is. The problem appears to be some kind of cc-mode cache corruption. This recipe behaves correctly: $ emacs -Q --eval '(progn (c-mode) (insert "/*foo*/") (backward-char) (c-context-line-break) (delete-char -2) (end-of-line) (c-before-change (point-min) (point-max)) (c-after-change (point-min) (point-max) (1- (point-max))) (c-context-line-break))'