unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Alan Mackenzie <acm@muc.de>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 44823@debbugs.gnu.org
Subject: bug#44823: 27.1.50; c-context-line-break misbehaves at end of comment
Date: Tue, 24 Nov 2020 16:39:29 +0000	[thread overview]
Message-ID: <20201124163929.GB30574@ACM> (raw)
In-Reply-To: <20201124162246.GA15477@ACM>

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 <https://www.gnu.org/licenses/>.  */

> > 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 <acm@muc.de>
> 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).





  parent reply	other threads:[~2020-11-24 16:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-23 17:33 bug#44823: 27.1.50; c-context-line-break misbehaves at end of comment Eli Zaretskii
2020-11-23 17:51 ` Eli Zaretskii
2020-11-24 16:22 ` Alan Mackenzie
2020-11-24 16:37   ` Eli Zaretskii
2020-11-24 16:39   ` Alan Mackenzie [this message]
2020-11-24 18:34     ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201124163929.GB30574@ACM \
    --to=acm@muc.de \
    --cc=44823@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).