mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-16 10:50:49 -08:00
gravatar.el (gravatar-create-image): New function.
This commit is contained in:
parent
1ef075bb27
commit
4b36c6d4de
2 changed files with 18 additions and 2 deletions
|
|
@ -1,3 +1,10 @@
|
||||||
|
2010-10-01 Katsumi Yamaoka <yamaoka@jpl.org>
|
||||||
|
|
||||||
|
* gravatar.el: Don't load image.el that XEmacs doesn't provide.
|
||||||
|
(gravatar-create-image): New function that's an alias to
|
||||||
|
gnus-xmas-create-image, gnus-create-image, or create-image.
|
||||||
|
(gravatar-data->image): Use it.
|
||||||
|
|
||||||
2010-09-30 Teodor Zlatanov <tzz@lifelogs.com>
|
2010-09-30 Teodor Zlatanov <tzz@lifelogs.com>
|
||||||
|
|
||||||
* gnus-registry.el (gnus-registry-install-nnregistry): New function to
|
* gnus-registry.el (gnus-registry-install-nnregistry): New function to
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,6 @@
|
||||||
|
|
||||||
;;; Code:
|
;;; Code:
|
||||||
|
|
||||||
(require 'image)
|
|
||||||
(require 'url)
|
(require 'url)
|
||||||
(require 'url-cache)
|
(require 'url-cache)
|
||||||
|
|
||||||
|
|
@ -84,12 +83,22 @@
|
||||||
(when (search-forward "\n\n" nil t)
|
(when (search-forward "\n\n" nil t)
|
||||||
(buffer-substring (point) (point-max)))))
|
(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 ()
|
(defun gravatar-data->image ()
|
||||||
"Get data of current buffer and return an image.
|
"Get data of current buffer and return an image.
|
||||||
If no image available, return 'error."
|
If no image available, return 'error."
|
||||||
(let ((data (gravatar-get-data)))
|
(let ((data (gravatar-get-data)))
|
||||||
(if data
|
(if data
|
||||||
(create-image data nil t)
|
(gravatar-create-image data nil t)
|
||||||
'error)))
|
'error)))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue