summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/net/shr.el17
2 files changed, 18 insertions, 5 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 08960c85f04..6c645e750d2 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
+2014-02-28 Ivan Kanis <ivan@kanis.fr>
+
+ * net/shr.el (shr-put-image): add custom variable
+ `shr-image-animate' to turn off image animation. It is so slow it
+ will render emacs unusable.
+
2014-02-28 Michael Albinus <michael.albinus@gmx.de>
* net/tramp-adb.el (tramp-adb-parse-device-names):
diff --git a/lisp/net/shr.el b/lisp/net/shr.el
index f23faaa3437..c7f8c0f50fc 100644
--- a/lisp/net/shr.el
+++ b/lisp/net/shr.el
@@ -100,6 +100,12 @@ Alternative suggestions are:
:group 'shr
:type 'function)
+(defcustom shr-image-animate t
+ "If non nil image will be animated."
+ :version "24.4"
+ :group 'shr
+ :type 'boolean)
+
(defvar shr-content-function nil
"If bound, this should be a function that will return the content.
This is used for cid: URLs, and the function is called with the
@@ -765,14 +771,15 @@ element is the data blob and the second element is the content-type."
(insert-sliced-image image (or alt "*") nil 20 1)
(insert-image image (or alt "*")))
(put-text-property start (point) 'image-size size)
- (when (cond ((fboundp 'image-multi-frame-p)
+ (when (and shr-image-animate
+ (cond ((fboundp 'image-multi-frame-p)
;; Only animate multi-frame things that specify a
;; delay; eg animated gifs as opposed to
;; multi-page tiffs. FIXME?
- (cdr (image-multi-frame-p image)))
- ((fboundp 'image-animated-p)
- (image-animated-p image)))
- (image-animate image nil 60)))
+ (cdr (image-multi-frame-p image)))
+ ((fboundp 'image-animated-p)
+ (image-animated-p image))))
+ (image-animate image nil 60)))
image)
(insert alt)))