From: Peter Jones via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: 49849@debbugs.gnu.org
Subject: bug#49849: 27.2; M-j broken when comment-auto-fill-only-comments is non-nil
Date: Tue, 03 Aug 2021 09:22:24 -0700 [thread overview]
Message-ID: <87h7g6v6pr.fsf@devalot.com> (raw)
When inside a comment, M-j will insert a newline then the
`comment-start' marker so you can continue writing a comment. However,
if `comment-auto-fill-only-comments' is non-nil, M-j will insert a
newline but not `comment-start'.
To reproduce, in a fresh emacs -Q:
(progn
(switch-to-buffer "*scratch*")
(end-of-buffer)
(insert "; ") ; one or more spaces after comment-start
(setq comment-auto-fill-only-comments t)
(default-indent-new-line) ; M-j
(beginning-of-line)
(cl-assert (looking-at-p ";")))
This assertion fails. However, if you set
`comment-auto-fill-only-comments' to nil it will succeeded.
This behavior is exhibited regardless of the major mode.
In GNU Emacs 27.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.27, cairo version 1.16.0)
Windowing system distributor 'The X.Org Foundation', version 11.0.12011000
System Description: NixOS 21.05 (Okapi)
Configured using:
'configure
--prefix=/nix/store/mf19iryz00nbykkfb8whyhx6ia7mb39y-emacs-27.2
--disable-build-details --with-modules --with-x-toolkit=gtk3 --with-xft
--with-cairo'
Configured features:
XPM JPEG TIFF GIF PNG RSVG CAIRO SOUND DBUS GSETTINGS GLIB NOTIFY
INOTIFY LIBSELINUX GNUTLS LIBXML2 FREETYPE HARFBUZZ M17N_FLT LIBOTF ZLIB
TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS LIBSYSTEMD JSON
PDUMPER GMP
Major mode: Emacs-Lisp
next reply other threads:[~2021-08-03 16:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-03 16:22 Peter Jones via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2021-08-04 8:03 ` bug#49849: 27.2; M-j broken when comment-auto-fill-only-comments is non-nil Lars Ingebrigtsen
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=87h7g6v6pr.fsf@devalot.com \
--to=bug-gnu-emacs@gnu.org \
--cc=49849@debbugs.gnu.org \
--cc=pjones@devalot.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).