[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master fee2aee: Don't set marks on imap groups when there
From: |
Eric Abrahamsen |
Subject: |
[Emacs-diffs] master fee2aee: Don't set marks on imap groups when there are no marks to set |
Date: |
Thu, 25 Jul 2019 15:26:06 -0400 (EDT) |
branch: master
commit fee2aeeb75849e84a8905f29c90f231986fbf7ab
Author: Eric Abrahamsen <address@hidden>
Commit: Eric Abrahamsen <address@hidden>
Don't set marks on imap groups when there are no marks to set
* lisp/gnus/nnimap.el (nnimap-update-qresync-info): This code runs in
a fairly tight loop and shouldn't call all these functions if not
necessary.
---
lisp/gnus/nnimap.el | 25 +++++++++++++------------
1 file changed, 13 insertions(+), 12 deletions(-)
diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el
index ad2b1a4..99a6104 100644
--- a/lisp/gnus/nnimap.el
+++ b/lisp/gnus/nnimap.el
@@ -1702,18 +1702,19 @@ If LIMIT, first try to limit the search to the N last
articles."
(cdr (or (assoc (caddr type) flags) ; %Flagged
(assoc (intern (cadr type) obarray) flags)
(assoc (cadr type) flags))))) ; "\Flagged"
- (setq marks (delq ticks marks))
- (pop ticks)
- ;; Add the new marks we got.
- (setq ticks (gnus-add-to-range ticks new-marks))
- ;; Remove the marks from messages that don't have them.
- (setq ticks (gnus-remove-from-range
- ticks
- (gnus-compress-sequence
- (gnus-sorted-complement existing new-marks))))
- (when ticks
- (push (cons (car type) ticks) marks)))
- (gnus-info-set-marks info marks t))
+ (when new-marks
+ (setq marks (delq ticks marks))
+ (pop ticks)
+ ;; Add the new marks we got.
+ (setq ticks (gnus-add-to-range ticks new-marks))
+ ;; Remove the marks from messages that don't have them.
+ (setq ticks (gnus-remove-from-range
+ ticks
+ (gnus-compress-sequence
+ (gnus-sorted-complement existing new-marks))))
+ (when ticks
+ (push (cons (car type) ticks) marks))
+ (gnus-info-set-marks info marks t))))
;; Add vanished to the list of unexisting articles.
(when vanished
(let* ((old-unexists (assq 'unexist marks))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master fee2aee: Don't set marks on imap groups when there are no marks to set,
Eric Abrahamsen <=