[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/tempel 20589b8a6a 18/82: Simplify
From: |
ELPA Syncer |
Subject: |
[elpa] externals/tempel 20589b8a6a 18/82: Simplify |
Date: |
Sun, 9 Jan 2022 20:58:42 -0500 (EST) |
branch: externals/tempel
commit 20589b8a6a18a68ed52326f0db0f0d0d1deac495
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>
Simplify
---
tempel.el | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/tempel.el b/tempel.el
index 4d4d2bc7e1..1c0b308642 100644
--- a/tempel.el
+++ b/tempel.el
@@ -74,11 +74,7 @@
(goto-char (point-max))
(insert "\n)")
(goto-char (point-min))
- (let ((templates (read (current-buffer))) result)
- (while (and templates (symbolp (car templates)))
- (push (cons (car templates) (seq-take-while #'consp (cdr templates)))
result)
- (setq templates (seq-drop-while #'consp (cdr templates))))
- result)))
+ (read (current-buffer))))
(defun tempel--annotate (templates sep name)
"Annotate template NAME given the list of TEMPLATES and SEP."
@@ -232,9 +228,12 @@ BEG and END are the boundaries of the modification."
(unless (equal tempel--modified mod)
(setq tempel--templates (tempel--load tempel-file)
tempel--modified mod)))
- (apply #'append (mapcar #'cdr
- (seq-filter (lambda (x) (derived-mode-p (car x)))
- tempel--templates))))
+ (let (result (templates tempel--templates))
+ (while (and templates (symbolp (car templates)))
+ (when (derived-mode-p (car templates))
+ (push (seq-take-while #'consp (cdr templates)) result))
+ (setq templates (seq-drop-while #'consp (cdr templates))))
+ (apply #'append result)))
(defun tempel--region ()
"Return region bounds."
- [elpa] branch externals/tempel created (now aec4f10253), ELPA Syncer, 2022/01/09
- [elpa] externals/tempel 20589b8a6a 18/82: Simplify,
ELPA Syncer <=
- [elpa] externals/tempel 507e9ed4de 40/82: Improve field initialization, ELPA Syncer, 2022/01/09
- [elpa] externals/tempel 11301795d8 51/82: Fix commentary, ELPA Syncer, 2022/01/09
- [elpa] externals/tempel 3aa1a7fca8 01/82: Initial commit, ELPA Syncer, 2022/01/09
- [elpa] externals/tempel e4839df533 53/82: Add temple-key, ELPA Syncer, 2022/01/09
- [elpa] externals/tempel 4a6fc2d0ab 46/82: Fix customization type, ELPA Syncer, 2022/01/09
- [elpa] externals/tempel 0aa4e8c37f 63/82: Only erase default value if the point is at the beginning or end, ELPA Syncer, 2022/01/09
- [elpa] externals/tempel def7a1ca3f 07/82: README: Update links, ELPA Syncer, 2022/01/09
- [elpa] externals/tempel 311f310b82 72/82: Remove todo, ELPA Syncer, 2022/01/09
- [elpa] externals/tempel 9cf5cc35b3 16/82: Use insert-file-contents, ELPA Syncer, 2022/01/09
- [elpa] externals/tempel db24ec0c9e 22/82: Reevaluate forms when arbitrary fields are modified, ELPA Syncer, 2022/01/09