[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/embark 36872170b0: Remove use of delete-blank-lines in
From: |
ELPA Syncer |
Subject: |
[elpa] externals/embark 36872170b0: Remove use of delete-blank-lines in embark-insert (fix #451) |
Date: |
Sun, 30 Jan 2022 14:57:33 -0500 (EST) |
branch: externals/embark
commit 36872170b0a632c4ff922249648656e2a91fdd04
Author: Omar Antolín <omar.antolin@gmail.com>
Commit: Omar Antolín <omar.antolin@gmail.com>
Remove use of delete-blank-lines in embark-insert (fix #451)
The call to delete-blank-lines was there to deal with the case of
insert a multiline string that ends in newline (a common case for me
in which this arises is using embark-insert right after the closing
parenthesis of a defun to make a copy of it). But I didn't realize
that delete-blank-lines also deletes the blank lines below the current
when the current line is not blank!
---
embark.el | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/embark.el b/embark.el
index 4393f17e58..9469e47ecf 100644
--- a/embark.el
+++ b/embark.el
@@ -3352,7 +3352,8 @@ its own."
(save-excursion
(insert string)
(maybe-whitespace)
- (delete-blank-lines))
+ (when (looking-at "\n\n")
+ (delete-char 1)))
(maybe-whitespace)))
(if buffer-read-only
(with-selected-window (other-window-for-scrolling)
@@ -3834,6 +3835,7 @@ The advice is self-removing so it only affects ACTION
once."
("a" align)
("A" align-regexp)
("i" indent-rigidly)
+ ("I" embark-insert)
("TAB" indent-region)
("f" fill-region)
("p" fill-region-as-paragraph)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [elpa] externals/embark 36872170b0: Remove use of delete-blank-lines in embark-insert (fix #451),
ELPA Syncer <=