* gnus-picon.el (gnus-picon-transform-address): Skip bad addresses.
authorShengHuo ZHU <zsh@cs.rochester.edu>
Sun, 30 Dec 2001 14:56:24 +0000 (14:56 +0000)
committerShengHuo ZHU <zsh@cs.rochester.edu>
Sun, 30 Dec 2001 14:56:24 +0000 (14:56 +0000)
lisp/ChangeLog
lisp/gnus-picon.el

index 1118033..fec2971 100644 (file)
@@ -1,5 +1,7 @@
 2001-12-30  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
+       * gnus-picon.el (gnus-picon-transform-address): Skip bad addresses.
+
        * gnus-art.el (gnus-with-article-headers): Move to here. Define
        the macro then use it.
 
index 35652f3..04f3761 100644 (file)
@@ -160,29 +160,30 @@ GLYPH can be either a glyph or a string."
          spec file)
       (dolist (address addresses)
        (setq address (car address))
-       (setq spec (split-string address "[.@]"))
-       (when (setq file (gnus-picon-find-face
-                         address gnus-picon-user-directories))
-         (setcar spec (gnus-picon-create-glyph file)))
-       (dotimes (i (1- (length spec)))
+       (when (stringp address)
+         (setq spec (split-string address "[.@]"))
          (when (setq file (gnus-picon-find-face
-                           (concat "unknown@"
-                                   (mapconcat
-                                    'identity (nthcdr (1+ i) spec) "."))
-                           gnus-picon-domain-directories t))
-           (setcar (nthcdr (1+ i) spec) (gnus-picon-create-glyph file))))
-       
-       (gnus-article-goto-header header)
-       (mail-header-narrow-to-field)
-       (when (search-forward address nil t)
-         (delete-region (match-beginning 0) (match-end 0))
-         (while spec
-           (gnus-picon-insert-glyph (pop spec))
-           (when spec
-             (if (not first)
-                 (insert ".")
-               (insert "@")
-               (setq first nil)))))))))
+                           address gnus-picon-user-directories))
+           (setcar spec (gnus-picon-create-glyph file)))
+         (dotimes (i (1- (length spec)))
+           (when (setq file (gnus-picon-find-face
+                             (concat "unknown@"
+                                     (mapconcat
+                                      'identity (nthcdr (1+ i) spec) "."))
+                             gnus-picon-domain-directories t))
+             (setcar (nthcdr (1+ i) spec) (gnus-picon-create-glyph file))))
+         
+         (gnus-article-goto-header header)
+         (mail-header-narrow-to-field)
+         (when (search-forward address nil t)
+           (delete-region (match-beginning 0) (match-end 0))
+           (while spec
+             (gnus-picon-insert-glyph (pop spec))
+             (when spec
+               (if (not first)
+                   (insert ".")
+                 (insert "@")
+                 (setq first nil))))))))))
 
 (defun gnus-picon-transform-newsgroups (header)
   (interactive)