[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 6939896 1/3: * lisp/simple.el (open-line): Fix docs
From: |
Artur Malabarba |
Subject: |
[Emacs-diffs] master 6939896 1/3: * lisp/simple.el (open-line): Fix docstring |
Date: |
Mon, 26 Oct 2015 00:28:48 +0000 |
branch: master
commit 6939896e2ffe2e742954c14bba6129af456f0857
Author: Artur Malabarba <address@hidden>
Commit: Artur Malabarba <address@hidden>
* lisp/simple.el (open-line): Fix docstring
Also explain apparently redundant line.
---
lisp/simple.el | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/lisp/simple.el b/lisp/simple.el
index 8acb683..5b05037 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -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)