X-Git-Url: http://cgit.sxemacs.org/?a=blobdiff_plain;f=lisp%2Fgnus-picon.el;h=d24f04e0215036fb722588849411f80454dfd955;hb=c9a58d3bdde1e6a8d653c1126f807da23441e459;hp=94e1572e634e1d36b770e8a7401230452222acc1;hpb=31a8dcd21a1fdd09b95e6cbe5e10cb37f66c7e64;p=gnus diff --git a/lisp/gnus-picon.el b/lisp/gnus-picon.el index 94e1572e6..d24f04e02 100644 --- a/lisp/gnus-picon.el +++ b/lisp/gnus-picon.el @@ -38,7 +38,7 @@ ;; ;;; Code: -;; For Emacs < 22.2. +;; For Emacs <22.2 and XEmacs. (eval-and-compile (unless (fboundp 'declare-function) (defmacro declare-function (&rest r)))) @@ -85,6 +85,12 @@ added right to the textual representation." (const right)) :group 'gnus-picon) +(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: (defvar gnus-picon-glyph-alist nil @@ -151,7 +157,9 @@ replacement is added." (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: @@ -186,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