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.
Full log
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
This bug report was last modified 6 years and 22 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.