From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#44823: 27.1.50; c-context-line-break misbehaves at end of comment Date: Tue, 24 Nov 2020 16:39:29 +0000 Message-ID: <20201124163929.GB30574@ACM> References: <83zh38ugeo.fsf@gnu.org> <20201124162246.GA15477@ACM> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33192"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 44823@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Nov 24 17:46:50 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 1khbSs-0008WB-CM for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 24 Nov 2020 17:46:50 +0100 Original-Received: from localhost ([::1]:42616 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1khbSr-0006nR-An for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 24 Nov 2020 11:46:49 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50870) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1khbMI-0000c5-IX for bug-gnu-emacs@gnu.org; Tue, 24 Nov 2020 11:40:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49522) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1khbMI-0003zX-8Z for bug-gnu-emacs@gnu.org; Tue, 24 Nov 2020 11:40:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1khbMI-0000gS-5c for bug-gnu-emacs@gnu.org; Tue, 24 Nov 2020 11:40:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 24 Nov 2020 16:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44823 X-GNU-PR-Package: emacs X-Debbugs-Original-Cc: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.16062359762592 (code B ref -1); Tue, 24 Nov 2020 16:40:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 24 Nov 2020 16:39:36 +0000 Original-Received: from localhost ([127.0.0.1]:32835 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1khbLs-0000fk-0b for submit@debbugs.gnu.org; Tue, 24 Nov 2020 11:39:36 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:53224) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1khbLq-0000fc-2S for submit@debbugs.gnu.org; Tue, 24 Nov 2020 11:39:34 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50776) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1khbLp-00081R-P3 for bug-gnu-emacs@gnu.org; Tue, 24 Nov 2020 11:39:33 -0500 Original-Received: from colin.muc.de ([193.149.48.1]:62926 helo=mail.muc.de) by eggs.gnu.org with smtp (Exim 4.90_1) (envelope-from ) id 1khbLn-0003wy-Cw for bug-gnu-emacs@gnu.org; Tue, 24 Nov 2020 11:39:33 -0500 Original-Received: (qmail 83112 invoked by uid 3782); 24 Nov 2020 16:39:29 -0000 Original-Received: from acm.muc.de (p4fe15a86.dip0.t-ipconnect.de [79.225.90.134]) by localhost.muc.de (tmda-ofmipd) with ESMTP; Tue, 24 Nov 2020 17:39:29 +0100 Original-Received: (qmail 31690 invoked by uid 1000); 24 Nov 2020 16:39:29 -0000 Content-Disposition: inline In-Reply-To: <20201124162246.GA15477@ACM> X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de Received-SPF: pass client-ip=193.149.48.1; envelope-from=acm@muc.de; helo=mail.muc.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, 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:194091 Archived-At: Hello again, Eli. On Tue, Nov 24, 2020 at 16:22:46 +0000, Alan Mackenzie wrote: > On Mon, Nov 23, 2020 at 19:33:35 +0200, Eli Zaretskii wrote: > > To reproduce: > > emacs -Q > > C-x C-f src/xdisp.c > > C-u 19 M-g g > > C-e > > This should bring you to the end of this line in xdisp.c: > > along with GNU Emacs. If not, see . */ > > It is the end of a comment. Now do this: > > M-: (local-set-key "\C-m" 'c-context-line-break) RET > > Then press RET. I expect Emacs to open a new line, indent it > > according to the context, and put point after the indentation. > > Instead, the new line is inserted _before_ the point's line, and point > > stays at the end of the comment as it was before. > > This is a regression wrt Emacs 26. > > I had this customization of RET in CC mode since about forever, and it > > always worked like I expected. Until Emacs 27.1. > > Can this be fixed for Emacs 27.2, please? > This is an off-by-one error, and was fixed in master with the following > commit: > commit 7574390099f0de11939a0e3626cf222b58863290 > Author: Alan Mackenzie > Date: Thu Jun 25 17:07:16 2020 +0000 > CC Mode. Fix an off by one error. Fixes bug #41809 > * lisp/progmodes/cc-engine.el (c-full-pp-to-literal): Change > to >= (twice). > I can't remember why I didn't commit this to the emacs-27 branch. > Possibly it was too close to the release. > I'll cherry-pick it back to the emacs-27 branch. DONE. It appears now to be working. -- Alan Mackenzie (Nuremberg, Germany).