Gnus -- minor build / warning fixes [OK For Upstream]
[gnus] / lisp / gnus-picon.el
index 2f347ef..c58059f 100644 (file)
@@ -1,6 +1,6 @@
 ;;; gnus-picon.el --- displaying pretty icons in Gnus
 
-;; Copyright (C) 1996-2012 Free Software Foundation, Inc.
+;; Copyright (C) 1996-2016 Free Software Foundation, Inc.
 
 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
 ;; Keywords: news xpm annotation glyph faces
 ;;
 ;;; Code:
 
-;; For Emacs <22.2 and XEmacs.
-(eval-and-compile
-  (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
-
 (eval-when-compile (require 'cl))
 
 (require 'gnus)
@@ -75,6 +71,12 @@ Some people may want to add \"unknown\" to this list."
   :type '(repeat string)
   :group 'gnus-picon)
 
+(defcustom gnus-picon-properties '(:color-symbols (("None" . "white")))
+  "List of image properties applied to picons."
+  :type 'sexp
+  :version "24.3"
+  :group 'gnus-picon)
+
 (defcustom gnus-picon-style 'inline
   "How should picons be displayed.
 If `inline', the textual representation is replaced.  If `right', picons are
@@ -111,7 +113,7 @@ List of pairs (KEY . GLYPH) where KEY is either a filename or an URL.")
   (let* ((address (gnus-picon-split-address address))
         (user (pop address))
         (faddress address)
-        database directory result instance base)
+        result base)
     (catch 'found
       (dolist (database gnus-picon-databases)
        (dolist (directory directories)
@@ -157,9 +159,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 nil nil
-                             :color-symbols '(("None" . "white"))))
+      (cdar (push (cons file (apply 'gnus-create-image
+                                   file nil nil
+                                   gnus-picon-properties))
                  gnus-picon-glyph-alist))))
 
 ;;; Functions that does picon transformations:
@@ -247,7 +249,7 @@ replacement is added."
    (gnus-article-goto-header header)
    (mail-header-narrow-to-field)
    (let ((groups (message-tokenize-header (mail-fetch-field header)))
-        spec file point)
+        spec file)
      (dolist (group groups)
        (unless (setq spec (cdr (assoc group gnus-picon-cache)))
         (setq spec (nreverse (split-string group "[.]")))