emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/tempel e529887d5d 70/82: tempel-expand: Fix exit functi


From: ELPA Syncer
Subject: [elpa] externals/tempel e529887d5d 70/82: tempel-expand: Fix exit function
Date: Sun, 9 Jan 2022 20:58:46 -0500 (EST)

branch: externals/tempel
commit e529887d5daee652251cead3b2ea7feb2af1434c
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>

    tempel-expand: Fix exit function
    
    Do not expand when status is 'exact.
---
 tempel.el | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/tempel.el b/tempel.el
index ee6e3b546b..8e164e2024 100644
--- a/tempel.el
+++ b/tempel.el
@@ -415,11 +415,12 @@ If INTERACTIVE is nil the function acts like a capf."
               :exclusive 'no
               :company-kind (lambda (_) 'snippet)
               :exit-function
-              (lambda (name _status)
-                (when-let* ((sym (intern-soft name))
-                            (template (alist-get sym templates)))
-                  (delete-region (max (point-min) (- (point) (length name))) 
(point))
-                  (tempel--insert template region)))
+              (lambda (name status)
+                (unless (eq status 'exact)
+                  (when-let* ((sym (intern-soft name))
+                              (template (alist-get sym templates)))
+                    (delete-region (max (point-min) (- (point) (length name))) 
(point))
+                    (tempel--insert template region))))
               :annotation-function
               (and tempel-expand-annotation
                    (apply-partially #'tempel--annotate



reply via email to

[Prev in Thread] Current Thread [Next in Thread]