Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
f086804c
Commit
f086804c
authored
Feb 25, 2014
by
Glenn Morris
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* lisp/image.el (image-animate, image-animate-timeout): Stop animating images
in dead buffers. Fixes: debbugs:16878
parent
c107155e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
24 deletions
+29
-24
lisp/ChangeLog
lisp/ChangeLog
+3
-0
lisp/image.el
lisp/image.el
+26
-24
No files found.
lisp/ChangeLog
View file @
f086804c
2014-02-25 Glenn Morris <rgm@gnu.org>
* image.el (image-animate, image-animate-timeout):
Stop animating images in dead buffers. (Bug#16878)
* emacs-lisp/edebug.el (defmacro): Fix debug spec. (Bug#16868)
* faces.el (tty-setup-hook, tty-run-terminal-initialization): Doc fixes.
...
...
lisp/image.el
View file @
f086804c
...
...
@@ -662,6 +662,7 @@ number, play until that number of seconds has elapsed."
(
when
animation
(
if
(
setq
timer
(
image-animate-timer
image
))
(
cancel-timer
timer
))
(
plist-put
(
cdr
image
)
:animate-buffer
(
current-buffer
))
(
run-with-timer
0.2
nil
'image-animate-timeout
image
(
or
index
0
)
(
car
animation
)
0
limit
))))
...
...
@@ -726,30 +727,31 @@ The minimum delay between successive frames is `image-minimum-frame-delay'.
If the image has a non-nil :speed property, it acts as a multiplier
for the animation speed. A negative value means to animate in reverse."
(
image-show-frame
image
n
t
)
(
let*
((
speed
(
image-animate-get-speed
image
))
(
time
(
float-time
))
(
animation
(
image-multi-frame-p
image
))
;; Subtract off the time we took to load the image from the
;; stated delay time.
(
delay
(
max
(
+
(
*
(
or
(
cdr
animation
)
image-default-frame-delay
)
(
/
1
(
abs
speed
)))
time
(
-
(
float-time
)))
image-minimum-frame-delay
))
done
)
(
setq
n
(
if
(
<
speed
0
)
(
1-
n
)
(
1+
n
)))
(
if
limit
(
cond
((
>=
n
count
)
(
setq
n
0
))
((
<
n
0
)
(
setq
n
(
1-
count
))))
(
and
(
or
(
>=
n
count
)
(
<
n
0
))
(
setq
done
t
)))
(
setq
time-elapsed
(
+
delay
time-elapsed
))
(
if
(
numberp
limit
)
(
setq
done
(
>=
time-elapsed
limit
)))
(
unless
done
(
run-with-timer
delay
nil
'image-animate-timeout
image
n
count
time-elapsed
limit
))))
(
when
(
buffer-live-p
(
plist-get
(
cdr
image
)
:animate-buffer
))
(
image-show-frame
image
n
t
)
(
let*
((
speed
(
image-animate-get-speed
image
))
(
time
(
float-time
))
(
animation
(
image-multi-frame-p
image
))
;; Subtract off the time we took to load the image from the
;; stated delay time.
(
delay
(
max
(
+
(
*
(
or
(
cdr
animation
)
image-default-frame-delay
)
(
/
1
(
abs
speed
)))
time
(
-
(
float-time
)))
image-minimum-frame-delay
))
done
)
(
setq
n
(
if
(
<
speed
0
)
(
1-
n
)
(
1+
n
)))
(
if
limit
(
cond
((
>=
n
count
)
(
setq
n
0
))
((
<
n
0
)
(
setq
n
(
1-
count
))))
(
and
(
or
(
>=
n
count
)
(
<
n
0
))
(
setq
done
t
)))
(
setq
time-elapsed
(
+
delay
time-elapsed
))
(
if
(
numberp
limit
)
(
setq
done
(
>=
time-elapsed
limit
)))
(
unless
done
(
run-with-timer
delay
nil
'image-animate-timeout
image
n
count
time-elapsed
limit
)))))
(
defvar
imagemagick-types-inhibit
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment