they are omitted. Can handle COLLECTION as a list, hash table,
or vector."
(or collection (setq collection gnus-active-hashtb))
- (let (choices group)
- (cond ((listp collection)
- (if (symbolp (car collection))
- (dolist (symbol collection)
- (setq group (symbol-name symbol))
- (push (if (string-match "[^\000-\177]" group)
- (gnus-group-decoded-name group)
- group)
- choices))
- (setq choices collection)))
- ((vectorp collection)
- (mapatoms (lambda (symbol)
- (setq group (symbol-name symbol))
- (push (if (string-match "[^\000-\177]" group)
- (gnus-group-decoded-name group)
- group)
- choices))
- collection))
- ((hash-table-p collection)
- (setq choices (hash-table-keys collection))))
- (setq group (gnus-completing-read (or prompt "Group") (reverse choices)
- require-match initial-input
- (or hist 'gnus-group-history)
- def))
+ (let* ((choices
+ (mapcar
+ (lambda (g)
+ (if (string-match "[^\000-\177]" g)
+ (gnus-group-decoded-name g)
+ g))
+ (cond ((listp collection)
+ collection)
+ ((vectorp collection)
+ (mapatoms #'symbol-name collection))
+ ((hash-table-p collection)
+ (hash-table-keys collection)))))
+ (group
+ (gnus-completing-read (or prompt "Group") (reverse choices)
+ require-match initial-input
+ (or hist 'gnus-group-history)
+ def)))
(unless (cond ((and (listp collection)
(symbolp (car collection)))
(member group (mapcar 'symbol-name collection)))