-respectively if they are omitted."
- (let* ((choices (mapcar (lambda (symbol)
- (let ((group (symbol-name symbol)))
- (if (string-match "[^\000-\177]" group)
- (gnus-group-decoded-name group)
- group)))
- (remove-if-not
- 'symbolp
- (or collection (or gnus-active-hashtb [0])))))
- (group
- (gnus-completing-read (or prompt "Group") choices
- require-match initial-input
- (or hist 'gnus-group-history)
- def)))
- (or (symbol-value (intern-soft group collection))
- (mm-encode-coding-string group (gnus-group-name-charset nil group)))))
+respectively if they are omitted. Regards COLLECTION as a hash table
+if it is not a list."
+ (or collection (setq collection gnus-active-hashtb))
+ (let (choices group)
+ (if (listp collection)
+ (dolist (symbol collection)
+ (setq group (symbol-name symbol))
+ (push (if (string-match "[^\000-\177]" group)
+ (gnus-group-decoded-name group)
+ group)
+ choices))
+ (mapatoms (lambda (symbol)
+ (setq group (symbol-name symbol))
+ (push (if (string-match "[^\000-\177]" group)
+ (gnus-group-decoded-name group)
+ group)
+ choices))
+ collection))
+ (setq group (gnus-completing-read (or prompt "Group") (nreverse choices)
+ require-match initial-input
+ (or hist 'gnus-group-history)
+ def))
+ (if (if (listp collection)
+ (member group (mapcar 'symbol-name collection))
+ (symbol-value (intern-soft group collection)))
+ group
+ (mm-encode-coding-string group (gnus-group-name-charset nil group)))))