branch: elpa/elfeed
commit 6fded41323610c56f2dc44b3c9d1690014fa2806
Author: Daniel Mendler <[email protected]>
Commit: Daniel Mendler <[email protected]>

    Use run-hook-with-args
---
 elfeed-db.el |  6 ++----
 elfeed.el    | 12 ++++++------
 2 files changed, 8 insertions(+), 10 deletions(-)

diff --git a/elfeed-db.el b/elfeed-db.el
index 280a4b39c7..83ccaa2eaa 100644
--- a/elfeed-db.el
+++ b/elfeed-db.el
@@ -157,8 +157,7 @@ Return non-nil if an actual update occurred, not counting 
content."
            and do
            (progn
              (avl-tree-enter elfeed-db-index id)
-             (cl-loop for hook in elfeed-new-entry-hook
-                      do (funcall hook entry)))
+             (run-hook-with-args 'elfeed-new-entry-hook entry))
            finally
            (unless (zerop change-count)
              (elfeed-db-set-update-time)))
@@ -247,8 +246,7 @@ The FEED-OR-ID may be a feed struct or a feed ID (url)."
   "Apply `elfeed-new-entry-hook' to all entries in the database."
   (interactive)
   (with-elfeed-db-visit (entry _)
-    (cl-loop for hook in elfeed-new-entry-hook
-             do (funcall hook entry))))
+    (run-hook-with-args 'elfeed-new-entry-hook entry)))
 
 (defmacro elfeed-db-return (&optional value)
   "Use this to exit early and return VALUE from `with-elfeed-db-visit'."
diff --git a/elfeed.el b/elfeed.el
index d5e15aebd6..ae593b1b3b 100644
--- a/elfeed.el
+++ b/elfeed.el
@@ -358,8 +358,8 @@ URL identifies the feed and XML is the parsed content."
                                            (list :authors authors))
                                        ,@(when categories
                                            (list :categories categories))))))
-               (dolist (hook elfeed-new-entry-parse-hook)
-                 (funcall hook :atom entry db-entry))
+               (run-hook-with-args 'elfeed-new-entry-parse-hook
+                                   :atom entry db-entry)
                db-entry))))
 
 (defsubst elfeed--rss-author-to-plist (author)
@@ -427,8 +427,8 @@ URL identifies the feed and XML is the parsed content."
                                            (list :authors authors))
                                        ,@(when categories
                                            (list :categories categories))))))
-               (dolist (hook elfeed-new-entry-parse-hook)
-                 (funcall hook :rss item db-entry))
+               (run-hook-with-args 'elfeed-new-entry-parse-hook
+                                   :rss item db-entry)
                db-entry))))
 
 (defun elfeed-entries-from-rss1.0 (url xml)
@@ -463,8 +463,8 @@ URL identifies the feed and XML is the parsed content."
                                       original-date date)
                                :content description
                                :content-type 'html)))
-               (dolist (hook elfeed-new-entry-parse-hook)
-                 (funcall hook :rss1.0 item db-entry))
+               (run-hook-with-args 'elfeed-new-entry-parse-hook
+                                   :rss1.0 item db-entry)
                db-entry))))
 
 (defun elfeed-feed-list ()

Reply via email to