branch: externals/tempel
commit fea9e9c48c884eeba8ab8b759d1ebeddb4737d95
Author: Daniel Mendler <[email protected]>
Commit: Daniel Mendler <[email protected]>

    tempel--templates: Append once in the end
---
 tempel.el | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/tempel.el b/tempel.el
index ca5a342cf1..2950bce842 100644
--- a/tempel.el
+++ b/tempel.el
@@ -553,16 +553,16 @@ TEMPLATES must be a list in the form (modes plist . 
templates)."
 
 (defun tempel--templates ()
   "Return templates for current mode."
-  (let (result)
+  (let (list)
     (run-hook-wrapped
      'tempel-template-sources
      (lambda (fun)
        (cond
-        ((functionp fun) (cl-callf append result (funcall fun)))
-        ((boundp fun) (cl-callf append result (symbol-value fun)))
+        ((functionp fun) (push (funcall fun) list))
+        ((boundp fun) (push (symbol-value fun) list))
         (t (error "Template source is not a function or a variable: %S" fun)))
        nil))
-    result))
+    (apply #'append list)))
 
 (defun tempel--region ()
   "Return region bounds."

Reply via email to