[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/tempel 934bf35f4b 37/82: Set deleted overlays to nil
From: |
ELPA Syncer |
Subject: |
[elpa] externals/tempel 934bf35f4b 37/82: Set deleted overlays to nil |
Date: |
Sun, 9 Jan 2022 20:58:43 -0500 (EST) |
branch: externals/tempel
commit 934bf35f4b45c3153db2cc87950e8984fe89ea73
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>
Set deleted overlays to nil
---
tempel.el | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/tempel.el b/tempel.el
index d727806c58..9619234bae 100644
--- a/tempel.el
+++ b/tempel.el
@@ -153,18 +153,17 @@ BEG and END are the boundaries of the modification."
"Replace region beween BEG and END with STR.
If OV is alive, move it."
(let ((old (buffer-substring-no-properties beg end)))
+ (setq ov (and ov (overlay-buffer ov) ov))
(unless (equal str old)
(unless (eq buffer-undo-list t)
- (push (list 'apply #'tempel--replace
- beg (+ beg (length str)) ov old)
+ (push (list 'apply #'tempel--replace beg (+ beg (length str)) ov old)
buffer-undo-list))
(with-silent-modifications
(save-excursion
(goto-char beg)
(delete-char (- end beg))
(insert str)
- (when (overlay-buffer ov)
- (move-overlay ov beg (point))))))))
+ (when ov (move-overlay ov beg (point))))))))
(defun tempel--field (st &optional name init)
"Add template field to ST.
- [elpa] externals/tempel 9291904a84 24/82: Simplify overlay updates, (continued)
- [elpa] externals/tempel 9291904a84 24/82: Simplify overlay updates, ELPA Syncer, 2022/01/09
- [elpa] externals/tempel 5e1a864123 68/82: Add tempel-abbrev to define an abbrev, ELPA Syncer, 2022/01/09
- [elpa] externals/tempel 6c288c32a2 80/82: README: Document Capf setup (Fix #14), ELPA Syncer, 2022/01/09
- [elpa] externals/tempel b5cea7ac67 03/82: Add template markers, ELPA Syncer, 2022/01/09
- [elpa] externals/tempel 545b929a28 45/82: README: Fix formatting, ELPA Syncer, 2022/01/09
- [elpa] externals/tempel 1ef2d76dd1 35/82: Add screenshots, ELPA Syncer, 2022/01/09
- [elpa] externals/tempel fcfb19e134 47/82: Improve undo, ELPA Syncer, 2022/01/09
- [elpa] externals/tempel 36a7977702 62/82: Use cyan color for default values, ELPA Syncer, 2022/01/09
- [elpa] externals/tempel bcf135f993 66/82: Bind lexical environment for prompt eval, ELPA Syncer, 2022/01/09
- [elpa] externals/tempel 7a7813e531 26/82: Maintain list of active templates, ELPA Syncer, 2022/01/09
- [elpa] externals/tempel 934bf35f4b 37/82: Set deleted overlays to nil,
ELPA Syncer <=
- [elpa] externals/tempel a5dde06576 75/82: Add tempel-abbrev-mode and tempel-global-abbrev-mode, ELPA Syncer, 2022/01/09
- [elpa] externals/tempel 49ba6e795e 79/82: README update, ELPA Syncer, 2022/01/09
- [elpa] externals/tempel 72a31055cc 41/82: Fix movement commands, ELPA Syncer, 2022/01/09
- [elpa] externals/tempel 29ca4b424d 13/82: README formatting, ELPA Syncer, 2022/01/09
- [elpa] externals/tempel 931ea613cb 49/82: Remove faces, reduce visual noise, ELPA Syncer, 2022/01/09
- [elpa] externals/tempel 49f779027c 38/82: Minor corrections, ELPA Syncer, 2022/01/09
- [elpa] externals/tempel c8bd4d7e95 61/82: Add special treatment for default values, ELPA Syncer, 2022/01/09
- [elpa] externals/tempel 23443415c6 29/82: README: add more examples, ELPA Syncer, 2022/01/09
- [elpa] externals/tempel 566fbe15da 50/82: Add back faces, improve undo, ELPA Syncer, 2022/01/09
- [elpa] externals/tempel 87a5237034 28/82: Expand docstring, ELPA Syncer, 2022/01/09