fix: action-mark-read

This commit is contained in:
Pavel Korytov 2022-03-23 19:04:50 +03:00
parent 76f447bd0e
commit 07486b6058

View file

@ -655,7 +655,7 @@ POS and EVENT are forwarded to `widget-button-press'."
(let ((elfeed-summary--search-show-read t)) (let ((elfeed-summary--search-show-read t))
(elfeed-summary--action pos event))) (elfeed-summary--action pos event)))
(defun elfeed-summary--widget-press-mark-read (pos &optional event) (defun elfeed-summary--action-mark-read (pos &optional event)
"Press a button with `elfeed-summary--search-mark-read' set to t. "Press a button with `elfeed-summary--search-mark-read' set to t.
POS and EVENT are forwarded to `widget-button-press'." POS and EVENT are forwarded to `widget-button-press'."
@ -663,14 +663,14 @@ POS and EVENT are forwarded to `widget-button-press'."
(let ((elfeed-summary--search-mark-read t)) (let ((elfeed-summary--search-mark-read t))
(elfeed-summary--action pos event))) (elfeed-summary--action pos event)))
(defun elfeed-summary--mark-read (feed) (defun elfeed-summary--mark-read (feeds)
"Mark all items in the FEED as read. "Mark all the FEEDS items as read.
FEED is an instance of `elfeed-feed'." FEEDS is a list of instances of `elfeed-feed'."
(when (or (not elfeed-summary-confirm-mark-read) (when (or (not elfeed-summary-confirm-mark-read)
(y-or-n-p "Mark all entries in feed as read? ")) (y-or-n-p "Mark all entries in feed as read? "))
(with-elfeed-db-visit (entry feed-2) (with-elfeed-db-visit (entry feed)
(when (equal feed feed-2) (when (member feed feeds)
(when (member elfeed-summary-unread-tag (elfeed-entry-tags entry)) (when (member elfeed-summary-unread-tag (elfeed-entry-tags entry))
(setf (elfeed-entry-tags entry) (setf (elfeed-entry-tags entry)
(seq-filter (lambda (tag) (not (eq elfeed-summary-unread-tag tag))) (seq-filter (lambda (tag) (not (eq elfeed-summary-unread-tag tag)))