emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] trunk r116605: * net/shr.el (shr-put-image): add custom va


From: Ivan Kanis
Subject: [Emacs-diffs] trunk r116605: * net/shr.el (shr-put-image): add custom variable
Date: Fri, 28 Feb 2014 08:53:04 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 116605
revision-id: address@hidden
parent: address@hidden
committer: Ivan Kanis <address@hidden>
branch nick: trunk
timestamp: Fri 2014-02-28 09:49:59 +0100
message:
    * 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.
modified:
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/net/shr.el                shr.el-20101002102929-yfzewk55rsg0mn93-1
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2014-02-28 08:41:24 +0000
+++ b/lisp/ChangeLog    2014-02-28 08:49:59 +0000
@@ -1,3 +1,9 @@
+2014-02-28  Ivan Kanis  <address@hidden>
+
+       * 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  <address@hidden>
 
        * net/tramp-adb.el (tramp-adb-parse-device-names):

=== modified file 'lisp/net/shr.el'
--- a/lisp/net/shr.el   2014-01-31 21:44:11 +0000
+++ b/lisp/net/shr.el   2014-02-28 08:49:59 +0000
@@ -100,6 +100,12 @@
   :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 @@
              (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)))
 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]