Mercurial > emacs
comparison lisp/simple.el @ 1063:25b929c06f83
*** empty log message ***
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Mon, 31 Aug 1992 20:22:03 +0000 |
parents | 8ab465f7a7ff |
children | e33f6475229a |
comparison
equal
deleted
inserted
replaced
1062:35cc957d83d4 | 1063:25b929c06f83 |
---|---|
20 | 20 |
21 ;;; Code: | 21 ;;; Code: |
22 | 22 |
23 (defun open-line (arg) | 23 (defun open-line (arg) |
24 "Insert a newline and leave point before it. | 24 "Insert a newline and leave point before it. |
25 If there is a fill prefix, insert the fill prefix after the newline | 25 If there is a fill prefix, insert the fill prefix on the new line |
26 that it inserts. With arg N, insert N newlines." | 26 if the line would have been empty. |
27 With arg N, insert N newlines." | |
27 (interactive "*p") | 28 (interactive "*p") |
28 (let ((flag (and (bolp) (not (bobp))))) | 29 (let* ((do-fill-prefix (and fill-prefix (bolp))) |
30 (flag (and (null do-fill-prefix) (bolp) (not (bobp))))) | |
29 (if flag (forward-char -1)) | 31 (if flag (forward-char -1)) |
30 (while (> arg 0) | 32 (while (> arg 0) |
31 (save-excursion | 33 (save-excursion |
32 (insert ?\n) | 34 (insert ?\n)) |
33 (if fill-prefix (insert fill-prefix))) | 35 (if do-fill-prefix (insert fill-prefix)) |
34 (setq arg (1- arg))) | 36 (setq arg (1- arg))) |
35 (if flag (forward-char 1)))) | 37 (if flag (forward-char 1)))) |
36 | 38 |
37 (defun split-line () | 39 (defun split-line () |
38 "Split current line, moving portion beyond point vertically down." | 40 "Split current line, moving portion beyond point vertically down." |