(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))