GNU bug report logs -
#12413
24.2.50; M-j should be bound to default-indent-new-line
Previous Next
Reported by: Dmitry Gutov <dgutov <at> yandex.ru>
Date: Tue, 11 Sep 2012 09:37:01 UTC
Severity: wishlist
Tags: fixed, patch
Found in version 24.2.50
Fixed in version 27.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 12413 in the body.
You can then email your comments to 12413 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#12413
; Package
emacs
.
(Tue, 11 Sep 2012 09:37:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Dmitry Gutov <dgutov <at> yandex.ru>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Tue, 11 Sep 2012 09:37:01 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Tags: patch
A major mode can change the value of comment-line-break-function, but
currently it's only used from `do-auto-fill'. I think that doesn't make
sense, the value should affect the M-j command, too.
default-indent-new-line does pretty much that. The function could use a
better name, though - it isn't used in any variables as default value.
Inspired by bugs 6806 and 10367.
In GNU Emacs 24.2.50.1 (i386-mingw-nt6.1.7601)
of 2012-09-11 on SOL
Bzr revision: 109973 eggert <at> cs.ucla.edu-20120911012056-kegco8vmanqs0kpg
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
`configure --with-gcc (3.4) --cflags -IJ:/Apps/system/gnuwin32/include'
[m-j.diff (text/plain, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#12413
; Package
emacs
.
(Wed, 24 Feb 2016 06:13:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 12413 <at> debbugs.gnu.org (full text, mbox):
Dmitry Gutov <dgutov <at> yandex.ru> writes:
> A major mode can change the value of comment-line-break-function, but
> currently it's only used from `do-auto-fill'. I think that doesn't make
> sense, the value should affect the M-j command, too.
>
> default-indent-new-line does pretty much that. The function could use a
> better name, though - it isn't used in any variables as default value.
[...]
I think this makes sense, but it wasn't applied at the time (three years
ago). Is this still an issue?
> (define-key esc-map ";" 'comment-dwim)
> -(define-key esc-map "j" 'indent-new-comment-line)
> -(define-key esc-map "\C-j" 'indent-new-comment-line)
> +(define-key esc-map "j" 'default-indent-new-line)
> +(define-key esc-map "\C-j" 'default-indent-new-line)
> (define-key ctl-x-map ";" 'comment-set-column)
> (define-key ctl-x-map "f" 'set-fill-column)
> (define-key ctl-x-map "$" 'set-selective-display)
>
> === modified file 'lisp/simple.el'
> --- lisp/simple.el 2012-09-07 08:58:31 +0000
> +++ lisp/simple.el 2012-09-11 06:34:40 +0000
> @@ -5501,7 +5501,7 @@
>
> (defun default-indent-new-line (&optional soft)
> "Break line at point and indent.
> -If a comment syntax is defined, call `comment-indent-new-line'.
> +If a comment syntax is defined, call `comment-line-break-function'.
>
> The inserted newline is marked hard if variable `use-hard-newlines' is true,
> unless optional argument SOFT is non-nil."
>
> === modified file 'lisp/textmodes/refill.el'
> --- lisp/textmodes/refill.el 2012-07-11 23:13:41 +0000
> +++ lisp/textmodes/refill.el 2012-09-11 06:50:28 +0000
> @@ -179,7 +179,7 @@
> (refill-fill-paragraph-at refill-doit)
> (setq refill-doit nil)))
> ((or `quoted-insert `fill-paragraph `fill-region) nil)
> - ((or `newline `newline-and-indent `open-line `indent-new-comment-line
> + ((or `newline `newline-and-indent `open-line `default-indent-new-line
> `reindent-then-newline-and-indent)
> ;; Don't zap what was just inserted.
> (save-excursion
>
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#12413
; Package
emacs
.
(Wed, 24 Feb 2016 15:05:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 12413 <at> debbugs.gnu.org (full text, mbox):
On 02/24/2016 08:11 AM, Lars Ingebrigtsen wrote:
> I think this makes sense, but it wasn't applied at the time (three years
> ago). Is this still an issue?
Yup!
Apparently, it's not very urgent. In the meantime, I've worked around
this in js2-mode by binding comment-line-break-function's value directly
to M-j.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#12413
; Package
emacs
.
(Thu, 25 Feb 2016 05:45:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 12413 <at> debbugs.gnu.org (full text, mbox):
Dmitry Gutov <dgutov <at> yandex.ru> writes:
> A major mode can change the value of comment-line-break-function, but
> currently it's only used from `do-auto-fill'. I think that doesn't make
> sense, the value should affect the M-j command, too.
[...]
> -(define-key esc-map "j" 'indent-new-comment-line)
> -(define-key esc-map "\C-j" 'indent-new-comment-line)
> +(define-key esc-map "j" 'default-indent-new-line)
> +(define-key esc-map "\C-j" 'default-indent-new-line)
[...]
> - ((or `newline `newline-and-indent `open-line `indent-new-comment-line
> + ((or `newline `newline-and-indent `open-line `default-indent-new-line
I think this makes sense... probably... does anybody want to weigh in
on this?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#12413
; Package
emacs
.
(Thu, 27 Jun 2019 14:59:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 12413 <at> debbugs.gnu.org (full text, mbox):
Dmitry Gutov <dgutov <at> yandex.ru> writes:
> A major mode can change the value of comment-line-break-function, but
> currently it's only used from `do-auto-fill'. I think that doesn't make
> sense, the value should affect the M-j command, too.
>
> default-indent-new-line does pretty much that. The function could use a
> better name, though - it isn't used in any variables as default value.
Makes sense to me. I've now applied the patch to the Emacs trunk.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Added tag(s) fixed.
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Thu, 27 Jun 2019 14:59:03 GMT)
Full text and
rfc822 format available.
bug marked as fixed in version 27.1, send any further explanations to
12413 <at> debbugs.gnu.org and Dmitry Gutov <dgutov <at> yandex.ru>
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Thu, 27 Jun 2019 14:59:03 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Fri, 26 Jul 2019 11:24:07 GMT)
Full text and
rfc822 format available.
This bug report was last modified 4 years and 276 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.