X-Git-Url: https://cgit.sxemacs.org/?a=blobdiff_plain;f=lisp%2Fgnus-picon.el;h=3cc7c3701c59615a1eb3e4a97c70a28620d04788;hb=2b8b5c43a105a93cf8afa665b07561ead6436a41;hp=2f70eae3cd0307cb4d69a3a04e2128ab7738f2f8;hpb=dad3cffca8aa1fb6b9c70fbc8efd291f7f00a595;p=gnus diff --git a/lisp/gnus-picon.el b/lisp/gnus-picon.el index 2f70eae3c..3cc7c3701 100644 --- a/lisp/gnus-picon.el +++ b/lisp/gnus-picon.el @@ -85,8 +85,10 @@ added right to the textual representation." (const right)) :group 'gnus-picon) -(defface gnus-picon '((t (:foreground "black" :background "white"))) - "Face to show picon in." +(defcustom gnus-picon-inhibit-top-level-domains t + "If non-nil, don't piconify top-level domains. +These are often not very interesting." + :type 'boolean :group 'gnus-picon) ;;; Internal variables: @@ -151,13 +153,13 @@ replacement is added." (insert glyph) (gnus-add-wash-type category) (gnus-add-image category (car glyph)) - (let ((start (point))) - (gnus-put-image (car glyph) (unless nostring (cdr glyph)) category) - (put-text-property start (point) 'face 'gnus-picon)))) + (gnus-put-image (car glyph) (unless nostring (cdr glyph)) category))) (defun gnus-picon-create-glyph (file) (or (cdr (assoc file gnus-picon-glyph-alist)) - (cdar (push (cons file (gnus-create-image file)) + (cdar (push (cons file (gnus-create-image + file nil nil + :color-symbols '(("None" . "white")))) gnus-picon-glyph-alist)))) ;;; Functions that does picon transformations: @@ -192,7 +194,9 @@ replacement is added." (setcar spec (cons (gnus-picon-create-glyph file) (car spec)))) - (dotimes (i (1- (length spec))) + (dotimes (i (- (length spec) + (if gnus-picon-inhibit-top-level-domains + 2 1))) (when (setq file (gnus-picon-find-face (concat "unknown@" (mapconcat