Fix gnus-load.el generation.
[gnus] / lisp / gnus-notifications.el
index 3848dee..2941cc4 100644 (file)
@@ -1,6 +1,6 @@
 ;; gnus-notifications.el -- Send notification on new message in Gnus
 
-;; Copyright (C) 2012 Free Software Foundation, Inc.
+;; Copyright (C) 2012-2015 Free Software Foundation, Inc.
 
 ;; Author: Julien Danjou <julien@danjou.info>
 ;; Keywords: news
@@ -64,7 +64,8 @@ not get notifications."
 
 (defcustom gnus-notifications-timeout nil
   "Timeout used for notifications sent via `notifications-notify'."
-  :type 'integer
+  :type '(choice (const :tag "Server default" nil)
+                 (integer :tag "Milliseconds"))
   :group 'gnus-notifications)
 
 (defvar gnus-notifications-sent nil
@@ -92,15 +93,18 @@ Return a notification id if any, or t on success."
        :actions '("read" "Read")
        :on-action 'gnus-notifications-action
        :app-icon (gnus-funcall-no-warning
-                 'image-search-load-path "gnus/gnus.png")
+                  'image-search-load-path "gnus/gnus.png")
+       :image-path photo-file
        :app-name "Gnus"
        :category "email.arrived"
-       :timeout gnus-notifications-timeout
-       :image-path photo-file)
+       :timeout gnus-notifications-timeout)
     (message "New message from %s: %s" from subject)
     ;; Don't return an id
     t))
 
+(declare-function gravatar-retrieve-synchronously "gravatar.el"
+                 (mail-address))
+
 (defun gnus-notifications-get-photo (mail-address)
   "Get photo for mail address."
   (let ((google-photo (when (and gnus-notifications-use-google-contacts