1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-24 10:38:38 +00:00
Commit Graph

161 Commits

Author SHA1 Message Date
Glenn Morris
dc50451531 Rework recent image-multi-frame stuff a little
* image.el (image-current-frame): Change from variable to function.
(image-show-frame): Rename from image-nth-frame.  Update callers.

* image-mode.el (image-multi-frame): New variable.
(image-mode-map, image-mode, image-goto-frame):
Use image-multi-frame rather than image-current-frame.
(image-mode, image-goto-frame):
Use image-current-frame as function rather than as variable.
2013-02-19 23:57:33 -08:00
Glenn Morris
ed8d7fcaa2 Generalize "animated" images to "multi-frame" images
* lisp/image.el (image-animated-types): Remove.
(image-multi-frame-p): Rename from image-animated-p, and generalize.
(image-animated-p): Make obsolete alias.
(image-animate, image-nth-frame, image-animate-timeout):
Use image-multi-frame-p.
(image-animate-timeout): If no delay, use image-default-frame-delay.

* lisp/image-mode.el (image-mode, image-toggle-animation):
Use image-multi-frame-p.
(image-mode): Adjust startup message for a multi-frame image.

* lisp/gnus/shr.el (shr-put-image): Only animate images that specify a delay.
This is consistent with the old image-animated-p behavior.

* etc/NEWS: Add placeholder for this.

Fixes: debbugs:10739
2013-02-16 11:56:50 -08:00
Glenn Morris
99e619b617 Add variables for default/minimum animated image frame delay
* lisp/image.el (image-default-frame-delay): New variable.
(image-animated-p): Use image-default-frame-delay.
(image-minimum-frame-delay): New constant.
(image-animate-timeout): Use image-minimum-frame-delay.
2013-02-15 19:39:12 -08:00
Glenn Morris
c0211c4e37 Add commands for navigating multi-frame images
* lisp/image.el (image-nth-frame): New, split from image-animate-timeout.
(image-animate-timeout): Use image-nth-frame.

* lisp/image-mode.el (image-goto-frame, image-next-frame)
(image-previous-frame): New commands.
(image-mode-map): Add new frame commands.

* etc/NEWS: Mention this.
2013-02-15 19:29:39 -08:00
Glenn Morris
bb9dfee1d6 Display a mode-line frame counter for animated images
* lisp/image.el (image-current-frame): New variable.
(image-animate-timeout): Set image-current-frame.

* lisp/image-mode.el (image-mode): For animated images,
display a frame counter via mode-line-process.
2013-02-15 20:58:20 -05:00
Paul Eggert
0877d0dc24 Merge from emacs-24; up to 2012-12-06T01:39:03Z!monnier@iro.umontreal.ca 2013-01-02 08:13:04 -08:00
Paul Eggert
ab422c4d68 Update copyright notices for 2013. 2013-01-01 09:11:05 +00:00
Glenn Morris
2ac9538d67 Merge from emacs-24; up to 2012-11-15T23:31:37Z!dancol@dancol.org 2012-11-17 17:52:36 -08:00
Glenn Morris
913c8291bd * lisp/image.el (insert-image, insert-sliced-image): Doc fix. 2012-11-17 17:43:32 -08:00
Glenn Morris
11fef14abb * lisp/image.el (image-type-from-file-name): Trivial simplification. 2012-11-02 18:41:35 -04:00
Glenn Morris
ea1d4aaca0 image-type-from-file-name fix for bug#9045
* lisp/image.el (image-type-from-file-name): If multiple types match,
return the first one that is supported.
2012-10-22 20:46:11 -04:00
Glenn Morris
eda82a3153 * lisp/image.el (imagemagick-enabled-types): Doc fix. 2012-10-22 17:53:03 -04:00
Chong Yidong
d07ff9db92 Remove LIBRARIES arg from w32_delayed_load and friends.
These always use Vdynamic_library_alist anyway.

* src/image.c (Finit_image_library, lookup_image_type)
(define_image_type): Remove now-unneeded second arg.
(init_xpm_functions, init_png_functions, init_jpeg_functions)
(init_tiff_functions, init_gif_functions, init_svg_functions):
Arglist and w32_delayed_load calling convention changed.
(gs_type): Remove init_gs_functions; there is no such function.

* src/gnutls.c (init_gnutls_functions): Caller changed; remove arg.
(Fgnutls_available_p): Caller changed.

* src/xml.c (init_libxml2_functions, Flibxml_parse_html_region)
(Flibxml_parse_xml_region): Likewise.

* src/dispextern.h (struct image_type): Remove arg from init function.

* src/w32.c (w32_delayed_load): Remove LIBRARIES argument; always use
Vdynamic_library_alist.

* lisp/image.el (image-type-available-p): Change caller to
init-image-library.
2012-09-23 17:16:57 +08:00
Paul Eggert
72eac303ea Fix glitches caused by addition of psec to timers.
* etc/NEWS: Document timer format change.
* lisp/image.el (image-animate-timer):
* lisp/time.el (display-time-world-timer):
Use timer--function and timer--args rather than raw access to
timer vector.
* lisp/gnus/gnus-art.el (gnus-article-stop-animations):
Use timer--function rather than raw access to timer vector.

Fixes: debbugs:12430
2012-09-12 23:09:45 -07:00
Glenn Morris
2a1e24765b Replace version 24.2 with 24.3 where appropriate (hopefully) 2012-08-15 09:29:11 -07:00
Chong Yidong
72834e10a6 Give ImageMagick lowest priority in image-type-file-name-regexps.
* lisp/image.el (imagemagick-register-types): Put the ImageMagick
entry at the end of image-type-file-name-regexps.
2012-06-11 18:16:47 +08:00
Chong Yidong
47b36b94ca image.el (imagemagick-enabled-types): Remove CIN. 2012-06-04 21:02:23 +08:00
Chong Yidong
041df390e0 More tweaks to ImageMagick types.
* lisp/image.el (imagemagick-types-inhibit): Revert last change.  Add
INFO and M.
(imagemagick-enabled-types): Remove EPS and related formats.
2012-06-04 21:01:17 +08:00
Glenn Morris
7afbaca445 * etc/NEWS: Update for renamed variable.
* lisp/image.el (imagemagick-types-inhibit): Bump :version.
2012-06-03 16:07:48 -07:00
Chong Yidong
95f520b52b Add more enabled ImageMagick types.
* lisp/image.el (imagemagick-enabled-types): Rename from
imagemagick-types-enable.  Add many more types.
(imagemagick-types-inhibit): Change default to nil.
(imagemagick-filter-types): Caller changed.
2012-06-02 15:30:07 +08:00
Glenn Morris
43f5c7ae53 Fix imagemagick-filter-types for imagemagick-types-enable = t. 2012-05-31 13:21:31 -04:00
Glenn Morris
60b5f1870c Split off imagemagick-filter-types from imagemagick-register-types
* lisp/image.el: (imagemagick-filter-types): New function.  (Bug#7406)
(imagemagick-register-types): Use imagemagick-filter-types.

* etc/NEWS: Mention this.
2012-05-31 13:14:46 -04:00
Glenn Morris
32d72c2f5d Add option imagemagick-types-enable
* lisp/image.el: For clarity, call imagemagick-register-types at
top-level, rather than relying on a custom :initialize.
(imagemagick-types-enable): New option. 
(imagemagick-register-types): Respect imagemagick-types-inhibit.
If disabling support, remove elements altogether rather
than using an impossible regexp.
(imagemagick-types-inhibit): Give it the default init function.

* src/image.c (Fimagemagick_types): Doc fix.

* etc/NEWS: Mention this.

Fixes: debbugs:11557
2012-05-31 00:22:33 -07:00
Glenn Morris
87eb79c25b * lisp/image.el (imagemagick-types-inhibit): Doc fix.
* etc/NEWS: Related edits.
2012-05-25 16:24:58 -04:00
Chong Yidong
dce04f7f90 * image.el (image-type-from-buffer): Only return supported image type.
Fixes: debbugs:9045
2012-04-26 16:43:20 +08:00
Chong Yidong
c505aaeb00 Call imagemagick-register-types automatically.
* lisp/image.el (imagemagick--extension-regexp): New variable.
(imagemagick-register-types): Use it.
(imagemagick-types-inhibit): Add :set function.  Allow new value
of t to inhibit all types.

* lisp/loadup.el (fboundp): Preload regexp-opt, needed by
imagemagick-register-types.

* lisp/emacs-lisp/regexp-opt.el (regexp-opt-charset): Avoid cl macros,
so we can preload it.
2012-04-16 11:47:43 +08:00
Lars Magne Ingebrigtsen
bc72b5d984 Make `put-image' return the overlay created
* image.el (put-image): Return the overlay created instead of the
optional input string.  Note that this may break code
that is (for some reason or other) depending on `put-image'
returning the string.

Fixes: debbugs:7834
2012-04-10 04:34:57 +02:00
Chong Yidong
5319014e4f Updates for Display chapter of Lisp manual.
* doc/lispref/display.texi (Image Formats): Add imagemagick type.
(Image Descriptors): Mention how they are used.
(ImageMagick Images): Clarify role of imagemagick-register-types.
(Character Display): Don't mention glyph tables.
(Display Tables): Use make-glyph-code in example.
(Glyphs): Avoid "simple glyph code" terminology.  Note that glyph
tables are semi-obsolete.  De-document create-glyph.
(Glyphless Chars): Note that display tables override this.
(Bidirectional Display): Copyedits.  Introduce "bidirectional
reordering" terminology, and use it.

* doc/emacs/files.texi (File Conveniences): Clarify Imagemagick discussion.

* lisp/image.el (imagemagick-types-inhibit)
(imagemagick-register-types): Doc fix.
2012-03-31 00:31:24 +08:00
Glenn Morris
44e97401cd Standardize possessive apostrophe usage in manuals, docs, and comments
Ref: http://lists.gnu.org/archive/html/emacs-devel/2012-02/msg00649.html
2012-02-28 00:17:21 -08:00
Glenn Morris
b4ac6e8c18 Comment out the unimplemented image-transform-mode
* lisp/image-mode.el (image-transform-minor-mode-map, image-transform-mode):
Comment out (does nothing).

* etc/NEWS: Related edits.

* lisp/image.el: Comment.
2012-02-07 19:45:27 -08:00
Glenn Morris
222c901e18 Further doc fix for imagemagick-types-inhibit 2012-02-06 23:37:44 -08:00
Glenn Morris
dd605cc4a6 Small imagemagick doc fixes
* lisp/image.el (imagemagick-types-inhibit): Doc fix.

* src/image.c (Fimagemagick_types): Doc fix.
2012-02-06 19:46:18 -08:00
Glenn Morris
82ff1d1360 * lisp/image.el (image-extension-data): Add obsolete alias. 2012-02-03 21:09:34 -05:00
Glenn Morris
eea14f31d1 Document animated image API
* doc/lispref/display.texi (GIF Images): Mention animation.
Remove commented-out old example of animation.
(Animated Images): New subsection.
* doc/lispref/elisp.texi (Top):
* doc/lispref/vol1.texi (Top):
* doc/lispref/vol2.texi (Top): Add Animated Images menu entry.

* lisp/image-mode.el (image-animate-loop, image-toggle-animation): Doc fixes.

* lisp/image.el (image-animated-p): Doc fix.  Use image-animated-types.
(image-animate-timeout): Doc fix.

* etc/NEWS: Markup.
2012-02-03 00:44:30 -08:00
Glenn Morris
acaf905b11 Add 2012 to FSF copyright years for Emacs files 2012-01-05 01:46:05 -08:00
Stefan Monnier
e69df51669 * lisp/image.el (imagemagick-register-types): Use regexp-opt. 2011-09-16 09:46:42 -04:00
Deniz Dogan
0f0a88b94c * lisp/image.el (insert-image): Clarifying docstring. 2011-07-25 03:44:10 +02:00
Lars Magne Ingebrigtsen
12dc863d62 * image.el (put-image): Doc typo fix. 2011-07-17 17:57:47 +02:00
Lars Magne Ingebrigtsen
6a57fb5f2b `put-image' doc fix
* image.el (put-image): Mention the `put-image' overlay property
(bug#7834).
2011-07-14 19:20:37 +02:00
Chong Yidong
1100a63ce5 Handle gif subimage animation delay correctly.
* lisp/image.el (image-animated-p): Return animation delay in seconds.
Avoid bit manipulation in Lisp; use `delay' entry in the metadata.
(image-animate-timeout): Remove DELAY argument.  Use
image-animated-p to get animation delay for each frame.
(image-animate): Caller changed.

* src/image.c (gif_load): Add animation frame delay to the metadata.
(syms_of_image): Use DEFSYM.  New symbol `delay'.
2011-06-11 19:03:16 -04:00
Chong Yidong
18af70d025 Some changes and re-organization for animated gif support.
* lisp/image.el (image-animate-max-time): Moved to image-mode.el.
(create-animated-image): Remove unnecessary function.
(image-animate): Rename from image-animate-start.  New arg.
(image-animate-stop): Removed; just use image-animate-timer.
(image-animate-timer): Use car-safe.
(image-animate-timeout): Rename argument.

* lisp/image-mode.el (image-toggle-animation): New command.
(image-mode-map): Bind it to RET.
(image-mode): Update message.
(image-toggle-display-image): Avoid a spurious cache flush.
(image-transform-rotation): Doc fix.
(image-transform-properties): Return quickly in the normal case.
(image-animate-loop): Rename from image-animate-max-time.
2011-06-07 14:32:12 -04:00
Chong Yidong
e8cbec34e8 Fix animated gifs (Bug#6981).
* lisp/image-mode.el (image-toggle-display-image): Ensure that the
image spec passed to the animate timer is the same object as in
the the buffer's display property.
(image-transform-properties): Doc fix.

* lisp/image.el (image-animate-max-time): Default to nil.

* lisp/image.el (image-animate-max-time): Allow nil and t values.
Default to nil.
(create-animated-image): Doc fix.
(image-animate-start): Remove second arg; just use
image-animate-max-time.
(image-animate-timeout): Doc fix.  Args changed.
2011-05-29 17:35:35 -04:00
Chong Yidong
d66c4c7ce6 Doc fixes for imagemagick support code.
* lisp/image.el (imagemagick-types-inhibit)
(imagemagick-register-types): Doc fix.

* src/image.c: Various fixes to ImageMagick code comments.
(Fimagemagick_types): Doc fix.
2011-05-29 14:17:28 -04:00
Juanma Barranquero
5fd6245244 lisp/image.el: Avoid some warnings.
* image.el (image-type-file-name-regexps): Make it variable.
  `imagemagick-register-types' modifies it, and the user may want
  to add new extensions for known image types.
  (imagemagick-register-types): Throw error if not using ImageMagick.
2011-03-22 14:10:43 +01:00
Glenn Morris
73b0cd5003 Convert consecutive FSF copyright years to ranges. 2011-01-24 20:08:28 -08:00
Glenn Morris
e9bffc61f2 Refill some copyright headers. 2011-01-15 18:21:30 -08:00
Glenn Morris
0d9f702fd0 Nuke arch-tags. 2011-01-15 15:16:57 -08:00
Stefan Monnier
77ab81d054 Merge from emacs-23 2011-01-14 12:18:41 -05:00
Glenn Morris
5df4f04cd3 Add 2011 to FSF/AIST copyright years. 2011-01-02 15:50:46 -08:00
Chong Yidong
01898dc200 Avoid inline image variables for checkboxes (Bug#7222).
* etc/images/checked.xpm:
* etc/images/unchecked.xpm: New images.

* image.el (image-checkbox-checked, image-checkbox-unchecked):
Deleted (Bug#7222).

* startup.el (fancy-startup-tail): Instead of using inline images,
refer to image files from etc/.

* wid-edit.el (checkbox): Likewise.
(widget-image-find): Center image specs.
2010-10-24 19:40:55 -04:00