diff options
| author | Lars Ingebrigtsen | 2012-09-03 22:12:02 +0000 |
|---|---|---|
| committer | Katsumi Yamaoka | 2012-09-03 22:12:02 +0000 |
| commit | 8a8507e9b726ac9eb347270b04cb9daafb093cbe (patch) | |
| tree | 409439a805e55c0baaca28b2648e8da36713fea9 | |
| parent | d42f4f0fb374051f2f80228821e5c0b824451807 (diff) | |
| download | emacs-8a8507e9b726ac9eb347270b04cb9daafb093cbe.tar.gz emacs-8a8507e9b726ac9eb347270b04cb9daafb093cbe.zip | |
[Gnus] Silence XEmacs compilation warnings
| -rw-r--r-- | lisp/gnus/ChangeLog | 9 | ||||
| -rw-r--r-- | lisp/gnus/gnus-fun.el | 4 | ||||
| -rw-r--r-- | lisp/gnus/gnus-notifications.el | 16 |
3 files changed, 24 insertions, 5 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index a4e3d9bde2b..37d89ba8cad 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog | |||
| @@ -1,3 +1,12 @@ | |||
| 1 | 2012-09-03 Lars Ingebrigtsen <larsi@gnus.org> | ||
| 2 | |||
| 3 | * dgnushack.el: XEmacs 21.5 compilation fix. | ||
| 4 | |||
| 5 | * gnus-notifications.el (gnus-notifications-notify): Use it. | ||
| 6 | |||
| 7 | * gnus-fun.el (gnus-funcall-no-warning): New function to silence | ||
| 8 | warnings on XEmacs. | ||
| 9 | |||
| 1 | 2012-09-01 Paul Eggert <eggert@cs.ucla.edu> | 10 | 2012-09-01 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 11 | ||
| 3 | Better seeds for (random). | 12 | Better seeds for (random). |
diff --git a/lisp/gnus/gnus-fun.el b/lisp/gnus/gnus-fun.el index f33eb910c6a..f5e1c5ad691 100644 --- a/lisp/gnus/gnus-fun.el +++ b/lisp/gnus/gnus-fun.el | |||
| @@ -278,6 +278,10 @@ colors of the displayed X-Faces." | |||
| 278 | values)) | 278 | values)) |
| 279 | (mapconcat 'identity values " "))) | 279 | (mapconcat 'identity values " "))) |
| 280 | 280 | ||
| 281 | (defun gnus-funcall-no-warning (function &rest args) | ||
| 282 | (when (fboundp function) | ||
| 283 | (apply function args))) | ||
| 284 | |||
| 281 | (provide 'gnus-fun) | 285 | (provide 'gnus-fun) |
| 282 | 286 | ||
| 283 | ;;; gnus-fun.el ends here | 287 | ;;; gnus-fun.el ends here |
diff --git a/lisp/gnus/gnus-notifications.el b/lisp/gnus/gnus-notifications.el index c5129958997..f9c2d309a35 100644 --- a/lisp/gnus/gnus-notifications.el +++ b/lisp/gnus/gnus-notifications.el | |||
| @@ -29,13 +29,16 @@ | |||
| 29 | 29 | ||
| 30 | ;;; Code: | 30 | ;;; Code: |
| 31 | 31 | ||
| 32 | (require 'notifications nil t) | 32 | (ignore-errors |
| 33 | (require 'notifications)) | ||
| 33 | (require 'gnus-sum) | 34 | (require 'gnus-sum) |
| 34 | (require 'gnus-group) | 35 | (require 'gnus-group) |
| 35 | (require 'gnus-int) | 36 | (require 'gnus-int) |
| 36 | (require 'gnus-art) | 37 | (require 'gnus-art) |
| 37 | (require 'gnus-util) | 38 | (require 'gnus-util) |
| 38 | (require 'google-contacts nil t) ; Optional | 39 | (ignore-errors |
| 40 | (require 'google-contacts)) ; Optional | ||
| 41 | (require 'gnus-fun) | ||
| 39 | 42 | ||
| 40 | (defgroup gnus-notifications nil | 43 | (defgroup gnus-notifications nil |
| 41 | "Send notifications on new message in Gnus." | 44 | "Send notifications on new message in Gnus." |
| @@ -81,12 +84,14 @@ not get notifications." | |||
| 81 | "Send a notification about a new mail. | 84 | "Send a notification about a new mail. |
| 82 | Return a notification id if any, or t on success." | 85 | Return a notification id if any, or t on success." |
| 83 | (if (fboundp 'notifications-notify) | 86 | (if (fboundp 'notifications-notify) |
| 84 | (notifications-notify | 87 | (gnus-funcall-no-warning |
| 88 | 'notifications-notify | ||
| 85 | :title from | 89 | :title from |
| 86 | :body subject | 90 | :body subject |
| 87 | :actions '("read" "Read") | 91 | :actions '("read" "Read") |
| 88 | :on-action 'gnus-notifications-action | 92 | :on-action 'gnus-notifications-action |
| 89 | :app-icon (image-search-load-path "gnus/gnus.png") | 93 | :app-icon (gnus-funcall-no-warning |
| 94 | 'image-search-load-path "gnus/gnus.png") | ||
| 90 | :app-name "Gnus" | 95 | :app-name "Gnus" |
| 91 | :category "email.arrived" | 96 | :category "email.arrived" |
| 92 | :timeout gnus-notifications-timeout | 97 | :timeout gnus-notifications-timeout |
| @@ -100,7 +105,8 @@ Return a notification id if any, or t on success." | |||
| 100 | (let ((google-photo (when (and gnus-notifications-use-google-contacts | 105 | (let ((google-photo (when (and gnus-notifications-use-google-contacts |
| 101 | (fboundp 'google-contacts-get-photo)) | 106 | (fboundp 'google-contacts-get-photo)) |
| 102 | (ignore-errors | 107 | (ignore-errors |
| 103 | (google-contacts-get-photo mail-address))))) | 108 | (gnus-funcall-no-warning |
| 109 | 'google-contacts-get-photo mail-address))))) | ||
| 104 | (if google-photo | 110 | (if google-photo |
| 105 | google-photo | 111 | google-photo |
| 106 | (when gnus-notifications-use-gravatar | 112 | (when gnus-notifications-use-gravatar |