nnimap-list-pattern))
(dolist (mbx (imap-mailbox-lsub "*" (car pattern) nil
nnimap-server-buffer))
- (or (let ((mailboxes (imap-mailbox-get 'list-flags mbx
- nnimap-server-buffer)))
- (while (and mailboxes
- (not (string-equal (downcase (car mailboxes))
- "\\noselect")))
- (pop mailboxes))
- mailboxes)
+ (or (member-if (lambda (mailbox)
+ (string= (downcase mailbox) "\\noselect"))
+ (imap-mailbox-get 'list-flags mbx
+ nnimap-server-buffer))
;; Escape SPC in mailboxes xxx relies on gnus internals
(let ((info (nnimap-find-minmax-uid mbx 'examine)))
(when info