branch: elpa/pacmacs
commit 080aae5f08697097fc491262834bb277202e7a85
Author: rexim <[email protected]>
Commit: rexim <[email protected]>
Use plist-bind for pacman-anim-next-frame function (#54)
---
pacman-anim.el | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/pacman-anim.el b/pacman-anim.el
index ed7b2d8e7b..40c4a51c37 100644
--- a/pacman-anim.el
+++ b/pacman-anim.el
@@ -77,11 +77,12 @@
(nth current-frame frames)))
(defun pacman-anim-next-frame (anim)
- (let* ((frames (plist-get anim :frames))
- (current-frame (plist-get anim :current-frame))
- (new-current-frame (mod (+ current-frame 1)
- (length frames))))
- (plist-put anim :current-frame new-current-frame)))
+ (plist-bind ((frames :frames)
+ (current-frame :current-frame))
+ anim
+ (let ((new-current-frame (mod (+ current-frame 1)
+ (length frames))))
+ (plist-put anim :current-frame new-current-frame))))
(defun pacman-anim-object-next-frame (anim-object)
(let ((anim (plist-get anim-object :animation)))