[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/tempel 48e227e096: tempel-abort: Only delete regions of
From: |
ELPA Syncer |
Subject: |
[elpa] externals/tempel 48e227e096: tempel-abort: Only delete regions of expanded templates (See #108) |
Date: |
Wed, 21 Jun 2023 06:59:29 -0400 (EDT) |
branch: externals/tempel
commit 48e227e096e143fa8eadfe3d1e93489fba6da86d
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>
tempel-abort: Only delete regions of expanded templates (See #108)
---
tempel.el | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/tempel.el b/tempel.el
index e758b11a4a..c6f867ea0d 100644
--- a/tempel.el
+++ b/tempel.el
@@ -593,11 +593,12 @@ This is meant to be a source in
`tempel-template-sources'."
(defun tempel-abort ()
"Abort template insertion."
(interactive)
- (when-let ((beg (tempel--beginning))
- (end (tempel--end)))
- ;; TODO abort only the topmost template?
- (while tempel--active (tempel--disable))
- (delete-region beg end)))
+ ;; TODO abort only the topmost template?
+ (while-let ((st (car tempel--active)))
+ (let ((beg (overlay-start (caar st)))
+ (end (overlay-end (caar st))))
+ (tempel--disable)
+ (delete-region beg end))))
(defun tempel--disable (&optional st)
"Disable template ST, or last template."
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [elpa] externals/tempel 48e227e096: tempel-abort: Only delete regions of expanded templates (See #108),
ELPA Syncer <=