[gnus git] branch master updated: m0-5-107-gc23b137 =1= Silence XEmacs compilation warnings.
Lars Ingebrigtsen <[email protected]>
| Newsgroups | gmane.emacs.gnus.cvs |
|---|---|
| Message-ID | <[email protected]> |
via c23b137e5e82992f99c3972fe871eaef9fb292a2 (commit)
from f36869c21744af08b25be653bdbaa81617f43ef8 (commit)
- Log -----------------------------------------------------------------
commit c23b137e5e82992f99c3972fe871eaef9fb292a2
Author: Lars Ingebrigtsen <[email protected]>
Date: Mon Sep 3 19:46:15 2012 +0200
Silence XEmacs compilation warnings.
* gnus-fun.el (gnus-funcall-no-warning): New function to silence
warnings on XEmacs.
* gnus-notifications.el (gnus-notifications-notify): Use it.
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index a28d86a..b8bff65 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,10 @@
+2012-09-03 Lars Ingebrigtsen <[email protected]>
+
+ * gnus-notifications.el (gnus-notifications-notify): Use it.
+
+ * gnus-fun.el (gnus-funcall-no-warning): New function to silence
+ warnings on XEmacs.
+
2012-09-01 Paul Eggert <[email protected]>
Better seeds for (random).
diff --git a/lisp/dgnushack.el b/lisp/dgnushack.el
index f281452..10c304d 100644
--- a/lisp/dgnushack.el
+++ b/lisp/dgnushack.el
@@ -141,6 +141,7 @@
(eval-and-compile
(when (featurep 'xemacs)
+ (defvar window-point-insertion-type nil)
(unless (fboundp 'defadvice)
(autoload 'defadvice "advice" nil nil 'macro))
(unless (boundp 'help-echo-owns-message)
diff --git a/lisp/gnus-fun.el b/lisp/gnus-fun.el
index f33eb91..f5e1c5a 100644
--- a/lisp/gnus-fun.el
+++ b/lisp/gnus-fun.el
@@ -278,6 +278,10 @@ colors of the displayed X-Faces."
values))
(mapconcat 'identity values " ")))
+(defun gnus-funcall-no-warning (function &rest args)
+ (when (fboundp function)
+ (apply function args)))
+
(provide 'gnus-fun)
;;; gnus-fun.el ends here
diff --git a/lisp/gnus-notifications.el b/lisp/gnus-notifications.el
index c512995..f9c2d30 100644
--- a/lisp/gnus-notifications.el
+++ b/lisp/gnus-notifications.el
@@ -29,13 +29,16 @@
;;; Code:
-(require 'notifications nil t)
+(ignore-errors
+ (require 'notifications))
(require 'gnus-sum)
(require 'gnus-group)
(require 'gnus-int)
(require 'gnus-art)
(require 'gnus-util)
-(require 'google-contacts nil t) ; Optional
+(ignore-errors
+ (require 'google-contacts)) ; Optional
+(require 'gnus-fun)
(defgroup gnus-notifications nil
"Send notifications on new message in Gnus."
@@ -81,12 +84,14 @@ not get notifications."
"Send a notification about a new mail.
Return a notification id if any, or t on success."
(if (fboundp 'notifications-notify)
- (notifications-notify
+ (gnus-funcall-no-warning
+ 'notifications-notify
:title from
:body subject
:actions '("read" "Read")
:on-action 'gnus-notifications-action
- :app-icon (image-search-load-path "gnus/gnus.png")
+ :app-icon (gnus-funcall-no-warning
+ 'image-search-load-path "gnus/gnus.png")
:app-name "Gnus"
:category "email.arrived"
:timeout gnus-notifications-timeout
@@ -100,7 +105,8 @@ Return a notification id if any, or t on success."
(let ((google-photo (when (and gnus-notifications-use-google-contacts
(fboundp 'google-contacts-get-photo))
(ignore-errors
- (google-contacts-get-photo mail-address)))))
+ (gnus-funcall-no-warning
+ 'google-contacts-get-photo mail-address)))))
(if google-photo
google-photo
(when gnus-notifications-use-gravatar
-----------------------------------------------------------------------
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we listed those
revisions in full, above.
Summary of changes:
lisp/ChangeLog | 7 +++++++
lisp/dgnushack.el | 1 +
lisp/gnus-fun.el | 4 ++++
lisp/gnus-notifications.el | 16 +++++++++++-----
4 files changed, 23 insertions(+), 5 deletions(-)
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnus Project".
The branch, master has been updated
hooks/post-receive
--
Gnus Project