unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: z@bcc32.com
Cc: 71459-done@debbugs.gnu.org
Subject: bug#71459: 29.3; reindent-then-newline-and-indent bug when newline triggers abbrev expansion
Date: Sat, 15 Jun 2024 13:05:51 +0300	[thread overview]
Message-ID: <86cyoiv7uo.fsf@gnu.org> (raw)
In-Reply-To: <87frtltqd9.fsf@bcc32.com> (z@bcc32.com)

> From: z@bcc32.com
> Date: Sun, 09 Jun 2024 23:42:58 -0400
> 
> 1. emacs -Q
> 2. Open an empty buffer in a mode like conf-mode.  Enable abbrev-mode.
> 3. Type "# this is a comment", select the line, and run M-x
>    add-mode-abbrev, give it some abbrev like "tc".
> 4. On a new line, type tc and then M-x reindent-then-newline-and-indent
> 
> I expect this to insert "# this is a comment", but instead it inserts
> "#this is a comment".  Note the missing space between the
> comment-start marker and the comment text.
> 
> For context, this came up in a major mode (ledger-mode) where I had
> bound RET to reindent-then-newline-and-indent, so it happens quite
> freqently to me.
> 
> I think just making reindent-then-newline-and-indent use a marker for
> the initial value of `pos' would work, but I haven't thought about it
> very much.

Thanks, I went with your suggestion of using a marker.  I installed
the change on the master branch, and I'm therefore closing this bug.





      reply	other threads:[~2024-06-15 10:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-10  3:42 bug#71459: 29.3; reindent-then-newline-and-indent bug when newline triggers abbrev expansion z
2024-06-15 10:05 ` Eli Zaretskii [this message]

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=86cyoiv7uo.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=71459-done@debbugs.gnu.org \
    --cc=z@bcc32.com \
    /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).