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

    Minor simplification
---
 tempel.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tempel.el b/tempel.el
index 2125871af6..dd58c90cb9 100644
--- a/tempel.el
+++ b/tempel.el
@@ -191,7 +191,7 @@ may be named with `tempel--name' or carry an evaluatable 
Lisp expression
   "Annotate template NAME given the list of TEMPLATES.
 WIDTH and SEP configure the formatting."
   (when-let* ((name (intern-soft name))
-              (elts (cdr (assoc name templates))))
+              (elts (alist-get name templates)))
     (let ((ann (truncate-string-to-width
                 (string-trim
                  (replace-regexp-in-string
@@ -207,7 +207,7 @@ WIDTH and SEP configure the formatting."
 FUN inserts the info into the buffer.
 TEMPLATES is the list of templates."
   (when-let* ((name (intern-soft name))
-              (elts (cdr (assoc name templates))))
+              (elts (alist-get name templates)))
     (with-current-buffer (get-buffer-create " *tempel-info*")
       (setq buffer-read-only t)
       (let ((inhibit-read-only t))

Reply via email to