diff options
| author | Eric Abrahamsen | 2019-07-25 12:24:43 -0700 |
|---|---|---|
| committer | Eric Abrahamsen | 2019-07-25 12:24:43 -0700 |
| commit | fee2aeeb75849e84a8905f29c90f231986fbf7ab (patch) | |
| tree | 2db38751915b60453d66df74f977b4f4e012802c | |
| parent | 1c74e5b9ea565d4952dd04178dc817d86e2f0ff1 (diff) | |
| download | emacs-fee2aeeb75849e84a8905f29c90f231986fbf7ab.tar.gz emacs-fee2aeeb75849e84a8905f29c90f231986fbf7ab.zip | |
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.
| -rw-r--r-- | lisp/gnus/nnimap.el | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el index ad2b1a4fb63..99a610487fe 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." | |||
| 1702 | (cdr (or (assoc (caddr type) flags) ; %Flagged | 1702 | (cdr (or (assoc (caddr type) flags) ; %Flagged |
| 1703 | (assoc (intern (cadr type) obarray) flags) | 1703 | (assoc (intern (cadr type) obarray) flags) |
| 1704 | (assoc (cadr type) flags))))) ; "\Flagged" | 1704 | (assoc (cadr type) flags))))) ; "\Flagged" |
| 1705 | (setq marks (delq ticks marks)) | 1705 | (when new-marks |
| 1706 | (pop ticks) | 1706 | (setq marks (delq ticks marks)) |
| 1707 | ;; Add the new marks we got. | 1707 | (pop ticks) |
| 1708 | (setq ticks (gnus-add-to-range ticks new-marks)) | 1708 | ;; Add the new marks we got. |
| 1709 | ;; Remove the marks from messages that don't have them. | 1709 | (setq ticks (gnus-add-to-range ticks new-marks)) |
| 1710 | (setq ticks (gnus-remove-from-range | 1710 | ;; Remove the marks from messages that don't have them. |
| 1711 | ticks | 1711 | (setq ticks (gnus-remove-from-range |
| 1712 | (gnus-compress-sequence | 1712 | ticks |
| 1713 | (gnus-sorted-complement existing new-marks)))) | 1713 | (gnus-compress-sequence |
| 1714 | (when ticks | 1714 | (gnus-sorted-complement existing new-marks)))) |
| 1715 | (push (cons (car type) ticks) marks))) | 1715 | (when ticks |
| 1716 | (gnus-info-set-marks info marks t)) | 1716 | (push (cons (car type) ticks) marks)) |
| 1717 | (gnus-info-set-marks info marks t)))) | ||
| 1717 | ;; Add vanished to the list of unexisting articles. | 1718 | ;; Add vanished to the list of unexisting articles. |
| 1718 | (when vanished | 1719 | (when vanished |
| 1719 | (let* ((old-unexists (assq 'unexist marks)) | 1720 | (let* ((old-unexists (assq 'unexist marks)) |