1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-24 14:30:43 -08:00

* lisp/simple.el (open-line): Fix docstring

Also explain apparently redundant line.
This commit is contained in:
Artur Malabarba 2015-10-24 22:24:09 +01:00
parent 61640f6fbc
commit 6939896e2f

View file

@ -460,10 +460,9 @@ A non-nil INTERACTIVE argument means to run the `post-self-insert-hook'."
(defun open-line (n)
"Insert a newline and leave point before it.
If there is a fill prefix and/or a `left-margin', insert them
on the new line if the line would have been blank.
With arg N, insert N newlines."
(interactive "*p")
If there is a fill prefix and/or a `left-margin', insert them on
the new line. If the old line would have been blank, insert them
on the old line as well.
(let* ((do-fill-prefix (and fill-prefix (bolp)))
(do-left-margin (and (bolp) (> (current-left-margin) 0)))
(loc (point-marker))
@ -478,6 +477,7 @@ With arg N, insert N newlines."
(forward-line 1)
(setq n (1- n)))
(goto-char loc)
;; Necessary in case a margin or prefix was inserted.
(end-of-line)))
(defun split-line (&optional arg)