mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-16 17:24:23 +00:00
Use default-indent-new-line' instead of indent-new-comment-line'
* lisp/simple.el (default-indent-new-line): Doc string fix. * lisp/textmodes/refill.el (refill-post-command-function): Make default-indent-new-line work as indent-new-comment-line. * lisp/textmodes/refill.el (refill-post-command-function): Bind `M-C-j' and `M-j' to default-indent-new-line instead of indent-new-comment-line to allow overriding via `comment-line-break-function' (bug#12413).
This commit is contained in:
parent
50ade7afc1
commit
8a11e430ec
3 changed files with 4 additions and 4 deletions
|
|
@ -1229,8 +1229,8 @@ if `inhibit-field-text-motion' is non-nil."
|
|||
(define-key ctl-x-map "\C-t" 'transpose-lines)
|
||||
|
||||
(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 [?\C-\;] 'comment-line)
|
||||
(define-key ctl-x-map "f" 'set-fill-column)
|
||||
|
|
|
|||
|
|
@ -7318,7 +7318,7 @@ indicating whether it should use soft newlines.")
|
|||
|
||||
(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."
|
||||
|
|
|
|||
|
|
@ -181,7 +181,7 @@ complex processing.")
|
|||
(setq refill-doit nil)))
|
||||
((or 'quoted-insert 'fill-paragraph 'fill-region) nil)
|
||||
((or 'newline 'newline-and-indent 'open-line 'indent-new-comment-line
|
||||
'reindent-then-newline-and-indent)
|
||||
'default-indent-new-line 'reindent-then-newline-and-indent)
|
||||
;; Don't zap what was just inserted.
|
||||
(save-excursion
|
||||
(beginning-of-line) ; for newline-and-indent
|
||||
|
|
|
|||
Loading…
Reference in a new issue