branch: externals/tempel
commit f0df571f6635da57dbb7399860a3327bb361cca9
Author: Daniel Mendler <[email protected]>
Commit: Daniel Mendler <[email protected]>
Respect derived modes
---
tempel.el | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tempel.el b/tempel.el
index 0442601dbf..4d4d2bc7e1 100644
--- a/tempel.el
+++ b/tempel.el
@@ -232,7 +232,9 @@ BEG and END are the boundaries of the modification."
(unless (equal tempel--modified mod)
(setq tempel--templates (tempel--load tempel-file)
tempel--modified mod)))
- (cdr (seq-find (lambda (x) (derived-mode-p (car x))) tempel--templates)))
+ (apply #'append (mapcar #'cdr
+ (seq-filter (lambda (x) (derived-mode-p (car x)))
+ tempel--templates))))
(defun tempel--region ()
"Return region bounds."