GNU bug report logs - #49849
27.2; M-j broken when comment-auto-fill-only-comments is non-nil

Previous Next

Package: emacs;

Reported by: Peter Jones <pjones <at> devalot.com>

Date: Tue, 3 Aug 2021 21:30:02 UTC

Severity: normal

Found in version 27.2

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Peter Jones <pjones <at> devalot.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 27.2; M-j broken when comment-auto-fill-only-comments is non-nil
Date: Tue, 03 Aug 2021 09:22:24 -0700
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




This bug report was last modified 3 years and 294 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.