mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-19 03:17:36 +00:00
*** empty log message ***
This commit is contained in:
parent
e4790daa39
commit
616ed245e9
1 changed files with 7 additions and 5 deletions
|
|
@ -22,15 +22,17 @@
|
|||
|
||||
(defun open-line (arg)
|
||||
"Insert a newline and leave point before it.
|
||||
If there is a fill prefix, insert the fill prefix after the newline
|
||||
that it inserts. With arg N, insert N newlines."
|
||||
If there is a fill prefix, insert the fill prefix on the new line
|
||||
if the line would have been empty.
|
||||
With arg N, insert N newlines."
|
||||
(interactive "*p")
|
||||
(let ((flag (and (bolp) (not (bobp)))))
|
||||
(let* ((do-fill-prefix (and fill-prefix (bolp)))
|
||||
(flag (and (null do-fill-prefix) (bolp) (not (bobp)))))
|
||||
(if flag (forward-char -1))
|
||||
(while (> arg 0)
|
||||
(save-excursion
|
||||
(insert ?\n)
|
||||
(if fill-prefix (insert fill-prefix)))
|
||||
(insert ?\n))
|
||||
(if do-fill-prefix (insert fill-prefix))
|
||||
(setq arg (1- arg)))
|
||||
(if flag (forward-char 1))))
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue