X-Git-Url: https://cgit.sxemacs.org/?a=blobdiff_plain;f=lisp%2Fgnus-picon.el;h=dc6feeec0ab4172225107333bb4620b1e677ef64;hb=c85ff27626350a909ee39474fecac012fec8cd26;hp=94e1572e634e1d36b770e8a7401230452222acc1;hpb=31a8dcd21a1fdd09b95e6cbe5e10cb37f66c7e64;p=gnus diff --git a/lisp/gnus-picon.el b/lisp/gnus-picon.el index 94e1572e6..dc6feeec0 100644 --- a/lisp/gnus-picon.el +++ b/lisp/gnus-picon.el @@ -1,7 +1,6 @@ ;;; gnus-picon.el --- displaying pretty icons in Gnus -;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1996-2011 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen ;; Keywords: news xpm annotation glyph faces @@ -38,7 +37,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 +84,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 +156,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 +193,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