Gnus development mailing list
 help / color / mirror / Atom feed
* Gravatar and XEmacs
@ 2010-09-28  5:59 Katsumi Yamaoka
  2010-09-28  7:45 ` Julien Danjou
  0 siblings, 1 reply; 5+ messages in thread
From: Katsumi Yamaoka @ 2010-09-28  5:59 UTC (permalink / raw)
  To: ding

Hi,

Currently gravatar.el is unable to compile with XEmacs because
image.el is not available:

Compiling gnus/lisp/gravatar.el...
While compiling toplevel forms in file gnus/lisp/gravatar.el:
  !! File error (("Cannot open load file" "image"))

Is there a plan to make it work?  It seems only the create-image
function is the reason image.el is required.  If so:

--8<---------------cut here---------------start------------->8---
--- gravatar.el~	2010-09-26 22:53:00 +0000
+++ gravatar.el	2010-09-28 05:58:08 +0000
@@ -24,7 +24,6 @@
 
 ;;; Code:
 
-(require 'image)
 (require 'url)
 (require 'url-cache)
 
@@ -84,12 +83,22 @@
     (when (search-forward "\n\n" nil t)
       (buffer-substring (point) (point-max)))))
 
+(eval-and-compile
+  (cond ((featurep 'xemacs)
+	 (require 'gnus-xmas)
+	 (defalias 'gravatar-create-image 'gnus-xmas-create-image))
+	((featurep 'gnus-ems)
+	 (defalias 'gravatar-create-image 'gnus-create-image))
+	(t
+	 (require 'image)
+	 (defalias 'gravatar-create-image 'create-image))))
+
 (defun gravatar-data->image ()
   "Get data of current buffer and return an image.
 If no image available, return 'error."
   (let ((data (gravatar-get-data)))
     (if data
-        (create-image data  nil t)
+        (gravatar-create-image data nil t)
       'error)))
 
 ;;;###autoload
--8<---------------cut here---------------end--------------->8---

Though it may be no more than a starting point to make it work
since I haven't tried Gravatar yet, though. ;-)



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-10-01  5:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-28  5:59 Gravatar and XEmacs Katsumi Yamaoka
2010-09-28  7:45 ` Julien Danjou
2010-09-28 11:52   ` Katsumi Yamaoka
2010-09-29 15:04     ` Lars Magne Ingebrigtsen
2010-10-01  5:46       ` Katsumi Yamaoka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).