[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r99791: Rename `image-extension-data'
From: |
Juri Linkov |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r99791: Rename `image-extension-data' to `image-metadata'. |
Date: |
Wed, 31 Mar 2010 17:55:01 +0300 |
User-agent: |
Bazaar (2.0.3) |
------------------------------------------------------------
revno: 99791
committer: Juri Linkov <address@hidden>
branch nick: trunk
timestamp: Wed 2010-03-31 17:55:01 +0300
message:
Rename `image-extension-data' to `image-metadata'.
http://lists.gnu.org/archive/html/emacs-devel/2010-03/msg01456.html
* image.c: Add `Qextension_data'.
(syms_of_image): Initialize and staticpro `Qextension_data'.
(Fimage_metadata): Rename from `Fimage_extension_data'.
(gif_load): Put GIF extension data to the property
`Qextension_data'.
* image.el (image-animated-p): Use `image-metadata' instead of
`image-extension-data'. Get GIF extenstion data from metadata
property `extension-data'.
modified:
etc/NEWS
lisp/ChangeLog
lisp/image.el
src/ChangeLog
src/image.c
=== modified file 'etc/NEWS'
--- a/etc/NEWS 2010-03-31 01:51:54 +0000
+++ b/etc/NEWS 2010-03-31 14:55:01 +0000
@@ -132,12 +132,14 @@
** Image API
*** When the image type is one of listed in `image-animated-types'
-and the number of sub-images in the image is more then one, then the
+and the number of sub-images in the image is more than one, then the
new function `create-animated-image' creates an animated image where
sub-images are displayed successively with the duration defined by
`image-animate-max-time' and the delay between sub-images defined
by the Graphic Control Extension of the image.
+*** `image-extension-data' is renamed to `image-metadata'.
+
** Progress reporters can now "spin".
The MIN-VALUE and MAX-VALUE arguments of `make-progress-reporter' can
now be nil, or omitted. This makes a "non-numeric" reporter. Each
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2010-03-31 02:53:53 +0000
+++ b/lisp/ChangeLog 2010-03-31 14:55:01 +0000
@@ -1,3 +1,9 @@
+2010-03-31 Juri Linkov <address@hidden>
+
+ * image.el (image-animated-p): Use `image-metadata' instead of
+ `image-extension-data'. Get GIF extenstion data from metadata
+ property `extension-data'.
+
2010-03-31 Stefan Monnier <address@hidden>
* simple.el (append-to-buffer): Simplify.
=== modified file 'lisp/image.el'
--- a/lisp/image.el 2010-03-11 06:17:08 +0000
+++ b/lisp/image.el 2010-03-31 14:55:01 +0000
@@ -681,8 +681,9 @@
shall be displayed."
(cond
((eq (plist-get (cdr image) :type) 'gif)
- (let* ((extdata (image-extension-data image))
- (images (plist-get extdata 'count))
+ (let* ((metadata (image-metadata image))
+ (images (plist-get metadata 'count))
+ (extdata (plist-get metadata 'extension-data))
(anim (plist-get extdata #xF9)))
(and (integerp images) (> images 1)
(stringp anim) (>= (length anim) 4)
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2010-03-31 14:28:16 +0000
+++ b/src/ChangeLog 2010-03-31 14:55:01 +0000
@@ -1,3 +1,11 @@
+2010-03-31 Juri Linkov <address@hidden>
+
+ * image.c: Add `Qextension_data'.
+ (syms_of_image): Initialize and staticpro `Qextension_data'.
+ (Fimage_metadata): Rename from `Fimage_extension_data'.
+ (gif_load): Put GIF extension data to the property
+ `Qextension_data'.
+
2010-03-31 Eli Zaretskii <address@hidden>
* xdisp.c (highlight_trailing_whitespace): Support highlight of
=== modified file 'src/image.c'
--- a/src/image.c 2010-01-24 23:03:13 +0000
+++ b/src/image.c 2010-03-31 14:55:01 +0000
@@ -604,7 +604,7 @@
extern Lisp_Object QCwidth, QCheight, QCforeground, QCbackground, QCfile;
extern Lisp_Object QCdata, QCtype;
extern Lisp_Object Qcenter;
-Lisp_Object QCascent, QCmargin, QCrelief, Qcount;
+Lisp_Object QCascent, QCmargin, QCrelief, Qcount, Qextension_data;
Lisp_Object QCconversion, QCcolor_symbols, QCheuristic_mask;
Lisp_Object QCindex, QCmatrix, QCcolor_adjustment, QCmask;
@@ -1011,8 +1011,8 @@
return mask;
}
-DEFUN ("image-extension-data", Fimage_extension_data, Simage_extension_data,
1, 2, 0,
- doc: /* Return extension data for image SPEC.
+DEFUN ("image-metadata", Fimage_metadata, Simage_metadata, 1, 2, 0,
+ doc: /* Return metadata for image SPEC.
FRAME is the frame on which the image will be displayed. FRAME nil
or omitted means use the selected frame. */)
(spec, frame)
@@ -7169,7 +7169,7 @@
struct frame *f;
struct image *img;
{
- /* IMG->data.ptr_val may contain extension data. */
+ /* IMG->data.ptr_val may contain metadata with extension data. */
img->data.lisp_val = Qnil;
x_clear_image (f, img);
}
@@ -7488,8 +7488,8 @@
}
}
- /* Save GIF image extension data for `image-extension-data'.
- Format is (count IMAGES FUNCTION "BYTES" ...). */
+ /* Save GIF image extension data for `image-metadata'.
+ Format is (count IMAGES extension-data (FUNCTION "BYTES" ...)). */
img->data.lisp_val = Qnil;
if (gif->SavedImages[ino].ExtensionBlockCount > 0)
{
@@ -7499,7 +7499,9 @@
img->data.lisp_val = Fcons (make_unibyte_string (ext->Bytes,
ext->ByteCount),
Fcons (make_number (ext->Function),
img->data.lisp_val));
- img->data.lisp_val = Fnreverse (img->data.lisp_val);
+ img->data.lisp_val = Fcons (Qextension_data,
+ Fcons (Fnreverse (img->data.lisp_val),
+ Qnil));
}
if (gif->ImageCount > 1)
img->data.lisp_val = Fcons (Qcount,
@@ -8403,6 +8405,8 @@
Qcount = intern_c_string ("count");
staticpro (&Qcount);
+ Qextension_data = intern_c_string ("extension-data");
+ staticpro (&Qextension_data);
QCascent = intern_c_string (":ascent");
staticpro (&QCascent);
@@ -8498,7 +8502,7 @@
defsubr (&Simage_refresh);
defsubr (&Simage_size);
defsubr (&Simage_mask_p);
- defsubr (&Simage_extension_data);
+ defsubr (&Simage_metadata);
#if GLYPH_DEBUG
defsubr (&Simagep);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r99791: Rename `image-extension-data' to `image-metadata'.,
Juri Linkov <=