+2002-01-02 ShengHuo ZHU <zsh@cs.rochester.edu>
+
+ * gnus-picon.el (gnus-picon-transform-newsgroups): Fix for the case
+ "Newsgroups: rec.music.beatles.moderated, rec.music.beatles".
+
2002-01-03 Steve Youngs <youngs@xemacs.org>
* gnus-sum.el (gnus-summary-make-menu-bar): XEmacs doesn't
(defun gnus-picon-transform-newsgroups (header)
(interactive)
(gnus-with-article-headers
- (let ((groups
- (sort
- (message-tokenize-header (mail-fetch-field header))
- (lambda (g1 g2) (> (length g1) (length g2)))))
+ (gnus-article-goto-header header)
+ (mail-header-narrow-to-field)
+ (let ((groups (message-tokenize-header (mail-fetch-field header)))
spec file point)
(dolist (group groups)
(setq spec (nreverse (split-string group "[.]")))
(setcar (nthcdr i spec)
(cons (gnus-picon-create-glyph file)
(nth i spec)))))
-
- (gnus-article-goto-header header)
- (mail-header-narrow-to-field)
(when (search-forward group nil t)
(delete-region (match-beginning 0) (match-end 0))
- (setq point (point))
- (while spec
- (goto-char point)
- (if (> (length spec) 1)
- (insert "."))
- (gnus-picon-insert-glyph (pop spec) 'newsgroups-picon)))))))
+ (save-restriction
+ (narrow-to-region (point) (point))
+ (while spec
+ (goto-char (point-min))
+ (if (> (length spec) 1)
+ (insert "."))
+ (gnus-picon-insert-glyph (pop spec) 'newsgroups-picon))
+ (goto-char (point-max))))))))
;;; Commands: