emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r109869: [Gnus] Silence XEmacs compil


From: Katsumi Yamaoka
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r109869: [Gnus] Silence XEmacs compilation warnings
Date: Mon, 03 Sep 2012 22:12:02 +0000
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 109869
author: Lars Ingebrigtsen <address@hidden>
committer: Katsumi Yamaoka <address@hidden>
branch nick: trunk
timestamp: Mon 2012-09-03 22:12:02 +0000
message:
  [Gnus] Silence XEmacs compilation warnings
modified:
  lisp/gnus/ChangeLog
  lisp/gnus/gnus-fun.el
  lisp/gnus/gnus-notifications.el
=== modified file 'lisp/gnus/ChangeLog'
--- a/lisp/gnus/ChangeLog       2012-09-01 01:04:26 +0000
+++ b/lisp/gnus/ChangeLog       2012-09-03 22:12:02 +0000
@@ -1,3 +1,12 @@
+2012-09-03  Lars Ingebrigtsen  <address@hidden>
+
+       * dgnushack.el: XEmacs 21.5 compilation fix.
+
+       * 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  <address@hidden>
 
        Better seeds for (random).

=== modified file 'lisp/gnus/gnus-fun.el'
--- a/lisp/gnus/gnus-fun.el     2012-07-24 22:17:17 +0000
+++ b/lisp/gnus/gnus-fun.el     2012-09-03 22:12:02 +0000
@@ -278,6 +278,10 @@
          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

=== modified file 'lisp/gnus/gnus-notifications.el'
--- a/lisp/gnus/gnus-notifications.el   2012-08-31 00:46:01 +0000
+++ b/lisp/gnus/gnus-notifications.el   2012-09-03 22:12:02 +0000
@@ -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 @@
   "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 @@
   (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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]