aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1992-08-31 20:22:03 +0000
committerRichard M. Stallman1992-08-31 20:22:03 +0000
commit616ed245e9bc6cca7fb41575193ac6dcf5ea422e (patch)
tree0116ee2c2494f9eeedcae9cd20cbd365e692b287
parente4790daa39c2f368b2b7365043e74ddc63048e9b (diff)
downloademacs-616ed245e9bc6cca7fb41575193ac6dcf5ea422e.tar.gz
emacs-616ed245e9bc6cca7fb41575193ac6dcf5ea422e.zip
*** empty log message ***
-rw-r--r--lisp/simple.el12
1 files changed, 7 insertions, 5 deletions
diff --git a/lisp/simple.el b/lisp/simple.el
index 69414a3cb11..3499fbd5549 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -22,15 +22,17 @@
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.
25If there is a fill prefix, insert the fill prefix after the newline 25If there is a fill prefix, insert the fill prefix on the new line
26that it inserts. With arg N, insert N newlines." 26if the line would have been empty.
27With 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