[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 7a2ac61: Fix check in `newline' for blank lines
From: |
Lars Ingebrigtsen |
Subject: |
master 7a2ac61: Fix check in `newline' for blank lines |
Date: |
Mon, 21 Sep 2020 10:39:56 -0400 (EDT) |
branch: master
commit 7a2ac61b5d3adbfa7c54434056b9b772f83078af
Author: Stephen Berman <stephen.berman@gmx.net>
Commit: Lars Ingebrigtsen <larsi@gnus.org>
Fix check in `newline' for blank lines
* lisp/simple.el (newline): Clarify doc string and fix check for
blank lines (bug#13810).
---
lisp/simple.el | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lisp/simple.el b/lisp/simple.el
index 7dc6958..d7486e5 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -516,7 +516,7 @@ This hook is run by `delete-selection-uses-region-p', which
see.")
"Propertized string representing a hard newline character.")
(defun newline (&optional arg interactive)
- "Insert a newline, and move to left margin of the new line if it's blank.
+ "Insert a newline, and move to left margin of the new line.
With prefix argument ARG, insert that many newlines.
If `electric-indent-mode' is enabled, this indents the final new line
@@ -553,7 +553,7 @@ A non-nil INTERACTIVE argument means to run the
`post-self-insert-hook'."
(save-excursion
(goto-char beforepos)
(beginning-of-line)
- (and (looking-at "[ \t]$")
+ (and (looking-at "[ \t]+$")
(> (current-left-margin) 0)
(delete-region (point)
(line-end-position))))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 7a2ac61: Fix check in `newline' for blank lines,
Lars Ingebrigtsen <=