[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/tempel a03c36c8dd 02/82: Improve behavior when template
From: |
ELPA Syncer |
Subject: |
[elpa] externals/tempel a03c36c8dd 02/82: Improve behavior when templates are nested |
Date: |
Sun, 9 Jan 2022 20:58:35 -0500 (EST) |
branch: externals/tempel
commit a03c36c8dd11bb0378da7eda3fc3c75e943b0c6e
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>
Improve behavior when templates are nested
---
tempel.el | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/tempel.el b/tempel.el
index c69085cf22..c024d3a22b 100644
--- a/tempel.el
+++ b/tempel.el
@@ -92,7 +92,6 @@
(template (cdr (assoc name templates))))
(setf (alist-get 'tempo-marks minor-mode-overriding-map-alist) tempel-map)
(let ((tempel--current template))
- (setq tempo-marks nil)
(tempo-insert-template 'tempel--current region))))
(defun tempel--save ()
@@ -113,16 +112,16 @@
(defun tempel-forward-mark ()
"Move to next template mark and quit at the end."
(interactive)
- (tempo-forward-mark)
(when-let (mark (car (last tempo-marks)))
- (when (>= (point) mark) (tempel-done))))
+ (when (>= (point) mark) (tempel-done)))
+ (tempo-forward-mark))
(defun tempel-backward-mark ()
"Move to previous template mark and quit at the beginning."
(interactive)
- (tempo-backward-mark)
(when-let (mark (car tempo-marks))
- (when (<= (point) mark) (tempel-done))))
+ (when (<= (point) mark) (tempel-done)))
+ (tempo-backward-mark))
(defun tempel-done ()
"Template completion is done."
@@ -143,7 +142,6 @@ If INTERACTIVE is nil the function acts like a capf."
(completion-at-point-functions (list #'tempel-expand)))
(tempel--save)
(or (completion-at-point) (user-error "Tempel: No completions")))
- (tempel-done)
(when-let (templates (tempel--templates))
(let ((region (use-region-p)) bounds)
(when region
@@ -165,7 +163,6 @@ If INTERACTIVE is nil the function acts like a capf."
(defun tempel-insert ()
"Insert Tempo template using `completing-read'."
(interactive)
- (tempel-done)
(let* ((templates (or (tempel--templates)
(error "Tempel: No templates for %s" major-mode)))
(completion-extra-properties
- [elpa] externals/tempel 9948c6889d 43/82: Add tempel-form-prefix and tempel-field-prefix, (continued)
- [elpa] externals/tempel 9948c6889d 43/82: Add tempel-form-prefix and tempel-field-prefix, ELPA Syncer, 2022/01/09
- [elpa] externals/tempel ad71c25632 32/82: Add syntax extension (p (FORM...) <NAME>), ELPA Syncer, 2022/01/09
- [elpa] externals/tempel 5dbdc76eb2 74/82: Specify the completion category tempel, ELPA Syncer, 2022/01/09
- [elpa] externals/tempel 65a3eb0458 76/82: Improve abbreviation expansion, ELPA Syncer, 2022/01/09
- [elpa] externals/tempel 57bbc5e681 78/82: README update, ELPA Syncer, 2022/01/09
- [elpa] externals/tempel ac3df540a4 69/82: Remove underlines from faces, ELPA Syncer, 2022/01/09
- [elpa] externals/tempel 7cf25bd795 71/82: Simplify templates data structure at load time, ELPA Syncer, 2022/01/09
- [elpa] externals/tempel 69f7cb3212 06/82: Reimplement without Tempo for more flexibility, ELPA Syncer, 2022/01/09
- [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 <=
- [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, 2022/01/09
- [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