[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/tempel 8f8588985a 04/82: Simplify template markers
From: |
ELPA Syncer |
Subject: |
[elpa] externals/tempel 8f8588985a 04/82: Simplify template markers |
Date: |
Sun, 9 Jan 2022 20:58:38 -0500 (EST) |
branch: externals/tempel
commit 8f8588985a38bd424a2c5acf506bf2e126be8015
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>
Simplify template markers
---
tempel.el | 20 ++++++--------------
1 file changed, 6 insertions(+), 14 deletions(-)
diff --git a/tempel.el b/tempel.el
index 92a7b520e2..057a9374cb 100644
--- a/tempel.el
+++ b/tempel.el
@@ -92,22 +92,14 @@
(when-let* ((name (intern-soft name))
(template (cdr (assoc name templates))))
(setf (alist-get 'tempo-marks minor-mode-overriding-map-alist) tempel-map)
- (let ((tempel--current template)
- (old-point (point))
- (split-overlays nil)
- (old-marks (copy-sequence tempo-marks)))
- (dolist (ov tempel--overlays)
- (when (and (<= (overlay-start ov) old-point) (>= (overlay-end ov)
old-point))
- (push ov split-overlays)))
+ (let ((tempel--current template))
+ (mapc #'delete-overlay tempel--overlays)
+ (setq tempel--overlays nil)
(tempo-insert-template 'tempel--current region)
- (dolist (ov split-overlays)
- (setf (overlay-end ov) old-point))
(dolist (x tempo-marks)
- (unless (member x old-marks)
- (let ((ov (make-overlay x x nil nil t)))
- (overlay-put ov 'face '(:underline t))
- (overlay-put ov 'before-string #(" " 0 1 (face highlight display
(space :width (1)))))
- (push ov tempel--overlays)))))))
+ (let ((ov (make-overlay x x)))
+ (overlay-put ov 'before-string #(" " 0 1 (face highlight display
(space :width (1)))))
+ (push ov tempel--overlays))))))
(defun tempel--save ()
"Save Tempo file buffer."
- [elpa] externals/tempel fbef94d77d 48/82: Minor cleanup, (continued)
- [elpa] externals/tempel fbef94d77d 48/82: Minor cleanup, ELPA Syncer, 2022/01/09
- [elpa] externals/tempel 01e7430343 27/82: Add docstrings, ELPA Syncer, 2022/01/09
- [elpa] externals/tempel a03c36c8dd 02/82: Improve behavior when templates are nested, ELPA Syncer, 2022/01/09
- [elpa] externals/tempel db6847a7f9 56/82: Make temple-key a macro, ELPA Syncer, 2022/01/09
- [elpa] externals/tempel 0e618cd169 23/82: Do not sort overlays, ELPA Syncer, 2022/01/09
- [elpa] externals/tempel 04d4f6c055 55/82: Use named key function, ELPA Syncer, 2022/01/09
- [elpa] externals/tempel 91f6978ddd 60/82: Use Tempo PROMPT as default value, ELPA Syncer, 2022/01/09
- [elpa] externals/tempel e20f982dc5 25/82: Remove global variable tempel--state, ELPA Syncer, 2022/01/09
- [elpa] externals/tempel fa99fb7f96 34/82: README: Update keybindings, ELPA Syncer, 2022/01/09
- [elpa] externals/tempel c4cd6e0f69 73/82: Rename tempel-expand -> tempel-complete, add tempel-expand (Fix #13), ELPA Syncer, 2022/01/09
- [elpa] externals/tempel 8f8588985a 04/82: Simplify template markers,
ELPA Syncer <=
- [elpa] externals/tempel d9efb707b3 20/82: Improve undo behavior, ELPA Syncer, 2022/01/09
- [elpa] externals/tempel 4bc75c1aba 52/82: Use the more subtle face colors from Modus, ELPA Syncer, 2022/01/09
- [elpa] externals/tempel 52d8556c05 57/82: Improve annotation function, ELPA Syncer, 2022/01/09
- [elpa] externals/tempel 675e759bde 64/82: Add special prompt treatment, ELPA Syncer, 2022/01/09
- [elpa] externals/tempel e6aa1892af 14/82: README: Simplify template, ELPA Syncer, 2022/01/09
- [elpa] externals/tempel 2ba940809a 42/82: Add temple-abort (Fix #2), ELPA Syncer, 2022/01/09
- [elpa] externals/tempel 5521546f48 10/82: README: Add header, ELPA Syncer, 2022/01/09
- [elpa] externals/tempel d2d5566282 65/82: Improve description of PROMPT/DEFAULT value, ELPA Syncer, 2022/01/09
- [elpa] externals/tempel e529887d5d 70/82: tempel-expand: Fix exit function, ELPA Syncer, 2022/01/09
- [elpa] externals/tempel 349e9735ac 08/82: Remove global temple-region variable, ELPA Syncer, 2022/01/09