diff options
| -rw-r--r-- | lisp/ChangeLog | 6 | ||||
| -rw-r--r-- | lisp/net/shr.el | 17 |
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 @@ | |||
| 1 | 2014-02-28 Ivan Kanis <ivan@kanis.fr> | ||
| 2 | |||
| 3 | * net/shr.el (shr-put-image): add custom variable | ||
| 4 | `shr-image-animate' to turn off image animation. It is so slow it | ||
| 5 | will render emacs unusable. | ||
| 6 | |||
| 1 | 2014-02-28 Michael Albinus <michael.albinus@gmx.de> | 7 | 2014-02-28 Michael Albinus <michael.albinus@gmx.de> |
| 2 | 8 | ||
| 3 | * net/tramp-adb.el (tramp-adb-parse-device-names): | 9 | * 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: | |||
| 100 | :group 'shr | 100 | :group 'shr |
| 101 | :type 'function) | 101 | :type 'function) |
| 102 | 102 | ||
| 103 | (defcustom shr-image-animate t | ||
| 104 | "If non nil image will be animated." | ||
| 105 | :version "24.4" | ||
| 106 | :group 'shr | ||
| 107 | :type 'boolean) | ||
| 108 | |||
| 103 | (defvar shr-content-function nil | 109 | (defvar shr-content-function nil |
| 104 | "If bound, this should be a function that will return the content. | 110 | "If bound, this should be a function that will return the content. |
| 105 | This is used for cid: URLs, and the function is called with the | 111 | 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." | |||
| 765 | (insert-sliced-image image (or alt "*") nil 20 1) | 771 | (insert-sliced-image image (or alt "*") nil 20 1) |
| 766 | (insert-image image (or alt "*"))) | 772 | (insert-image image (or alt "*"))) |
| 767 | (put-text-property start (point) 'image-size size) | 773 | (put-text-property start (point) 'image-size size) |
| 768 | (when (cond ((fboundp 'image-multi-frame-p) | 774 | (when (and shr-image-animate |
| 775 | (cond ((fboundp 'image-multi-frame-p) | ||
| 769 | ;; Only animate multi-frame things that specify a | 776 | ;; Only animate multi-frame things that specify a |
| 770 | ;; delay; eg animated gifs as opposed to | 777 | ;; delay; eg animated gifs as opposed to |
| 771 | ;; multi-page tiffs. FIXME? | 778 | ;; multi-page tiffs. FIXME? |
| 772 | (cdr (image-multi-frame-p image))) | 779 | (cdr (image-multi-frame-p image))) |
| 773 | ((fboundp 'image-animated-p) | 780 | ((fboundp 'image-animated-p) |
| 774 | (image-animated-p image))) | 781 | (image-animated-p image)))) |
| 775 | (image-animate image nil 60))) | 782 | (image-animate image nil 60))) |
| 776 | image) | 783 | image) |
| 777 | (insert alt))) | 784 | (insert alt))) |
| 778 | 785 | ||