]> code.delx.au - gnu-emacs/commitdiff
* lisp/simple.el (open-line): Fix docstring
authorArtur Malabarba <bruce.connor.am@gmail.com>
Sat, 24 Oct 2015 21:24:09 +0000 (22:24 +0100)
committerArtur Malabarba <bruce.connor.am@gmail.com>
Mon, 26 Oct 2015 00:27:10 +0000 (00:27 +0000)
Also explain apparently redundant line.

lisp/simple.el

index 8acb6839744b4949c4ba7a2c94207cd7f046fbd8..5b0503778bd059153789282fbf0895dc61238423 100644 (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)