]> code.delx.au - gnu-emacs/blobdiff - lisp/gnus/gnus-gravatar.el
Merge from origin/emacs-25
[gnu-emacs] / lisp / gnus / gnus-gravatar.el
index 8b9c49a998c75a22ef843e5c34fba52b415b657d..89be8640c532b1e908754739793f9a5cbd60c5e0 100644 (file)
@@ -1,6 +1,6 @@
 ;;; gnus-gravatar.el --- Gnus Gravatar support
 
-;; Copyright (C) 2010-2013 Free Software Foundation, Inc.
+;; Copyright (C) 2010-2016 Free Software Foundation, Inc.
 
 ;; Author: Julien Danjou <julien@danjou.info>
 ;; Keywords: news
 (defcustom gnus-gravatar-size nil
   "How big should gravatars be displayed.
 If nil, default to `gravatar-size'."
-  :type 'integer
+  :type '(choice (const nil) integer)
   :version "24.1"
   :group 'gnus-gravatar)
 
 (defcustom gnus-gravatar-properties '(:ascent center :relief 1)
   "List of image properties applied to Gravatar images."
-  :type 'list
+  :type 'plist
   :version "24.1"
   :group 'gnus-gravatar)
 
@@ -94,8 +94,9 @@ Set image category to CATEGORY."
                  (mail-address (cadr address)))
              (when (if real-name
                        (re-search-forward
-                        (concat (gnus-replace-in-string
-                                 (regexp-quote real-name) "[\t ]+" "[\t\n ]+")
+                        (concat (replace-regexp-in-string
+                                 "[\t ]+" "[\t\n ]+"
+                                 (regexp-quote real-name))
                                 "\\|"
                                 (regexp-quote mail-address))
                         nil t)
@@ -110,8 +111,7 @@ Set image category to CATEGORY."
                ;; another mail with the same someaddress.
                (unless (memq 'gnus-gravatar (text-properties-at (point)))
                  (let ((point (point)))
-                   (unless (featurep 'xemacs)
-                     (setq gravatar (append gravatar gnus-gravatar-properties)))
+                   (setq gravatar (append gravatar gnus-gravatar-properties))
                    (gnus-put-image gravatar (buffer-substring (point) (1+ point)) category)
                    (put-text-property point (point) 'gnus-gravatar address)
                    (gnus-add-wash-type category)