emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/tempel 2394b4a3d4: Remove tempel--path-timestamps varia


From: ELPA Syncer
Subject: [elpa] externals/tempel 2394b4a3d4: Remove tempel--path-timestamps variable
Date: Fri, 15 Apr 2022 17:57:49 -0400 (EDT)

branch: externals/tempel
commit 2394b4a3d45a60a32e0d97867dffe3790cf8c6d7
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>

    Remove tempel--path-timestamps variable
---
 tempel.el | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

diff --git a/tempel.el b/tempel.el
index 4a3ed0ca83..0c4d7027f2 100644
--- a/tempel.el
+++ b/tempel.el
@@ -117,9 +117,6 @@ If a file is modified, added or removed, reload the 
templates."
 (defvar tempel--path-templates nil
   "Templates loaded from the `tempel-path'.")
 
-(defvar tempel--path-timestamps nil
-  "Alist of files and modification times on the `tempel-path'.")
-
 (defvar tempel--history nil
   "Completion history used by `tempel-insert'.")
 
@@ -390,7 +387,7 @@ PROMPT is the optional prompt/default value."
   "Prompt to save modified files in `tempel-path'."
   (cl-loop
    with all = nil
-   for (file . _ts) in tempel--path-timestamps do
+   for (file . _ts) in (car tempel--path-templates) do
    (when-let (buf (get-file-buffer file))
      (with-current-buffer buf
        (when (and (buffer-modified-p)
@@ -441,11 +438,11 @@ This is meant to be a source in 
`tempel-template-sources'."
                       (file-attribute-modification-time
                        (file-attributes f))
                       'integer)))))
-      (unless (equal tempel--path-timestamps timestamps)
-        (setq tempel--path-timestamps timestamps
-              tempel--path-templates (mapcan #'tempel--file-read files)))))
+      (unless (equal (car tempel--path-templates) timestamps)
+        (setq tempel--path-templates (cons timestamps
+                                           (mapcan #'tempel--file-read 
files))))))
   (cl-loop
-   for (modes plist . templates) in tempel--path-templates
+   for (modes plist . templates) in (cdr tempel--path-templates)
    if (tempel--condition-p modes plist)
    append templates))
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]