src/image.c (pbm_next_char): New function.
(pbm_scan_number): Use it.
lisp/image.el (image-type-header-regexps): Fix the 'pbm' part to
allow comments in pbm files.
2013-08-13 Lars Magne Ingebrigtsen <larsi@gnus.org>
* image.el (image-content-type-suffixes): New variable.
2013-08-13 Lars Magne Ingebrigtsen <larsi@gnus.org>
* image.c (imagemagick_filename_hint): New function to possibly
apply `image-content-type-suffixes'.
(imagemagick_load_image): Use it.
* 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.
* 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
* 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.
* 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.
* 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
* 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.
* 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
* 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.
* 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