Function: tempel--for

tempel--for is a natively compiled function defined in tempel.el.

Signature

(tempel--for ALL FUN)

Documentation

Call FUN for template at point or all templates if ALL is non-nil.

Source Code

;; Defined in /nix/store/b3ibjbs2i12kyhwapibfx6i39f025i85-emacs-packages-deps/share/emacs/site-lisp/elpa/tempel-20260705.1258/tempel.el
(defun tempel--for (all fun)
  "Call FUN for template at point or all templates if ALL is non-nil."
  (declare (indent 1))
  (if all
      (if tempel--active
          (while tempel--active
            (funcall fun (car tempel--active)))
        (user-error "No active templates"))
    (funcall fun (overlay-get
                  (or (tempel--find-overlay 'tempel--range)
                      (user-error "No active template at point"))
                  'tempel--range))))