[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/pacmacs 1e1cebe39a 073/472: Introduce plist-map utility fu
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/pacmacs 1e1cebe39a 073/472: Introduce plist-map utility function (#54) |
Date: |
Thu, 6 Jan 2022 21:59:14 -0500 (EST) |
branch: elpa/pacmacs
commit 1e1cebe39a35a7d80a22dfc505577433038c3981
Author: rexim <reximkut@gmail.com>
Commit: rexim <reximkut@gmail.com>
Introduce plist-map utility function (#54)
---
pacman-anim.el | 5 +----
pacman-utils.el | 8 ++++++++
2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/pacman-anim.el b/pacman-anim.el
index 2e49f35123..de2f09a726 100644
--- a/pacman-anim.el
+++ b/pacman-anim.el
@@ -85,10 +85,7 @@
(plist-put anim :current-frame new-current-frame))))
(defun pacman-anim-object-next-frame (anim-object)
- (plist-bind ((anim :animation))
- anim-object
- (plist-put anim-object :animation
- (pacman-anim-next-frame anim))))
+ (plist-map anim-object :animation #'pacman-anim-next-frame))
(provide 'pacman-anim)
diff --git a/pacman-utils.el b/pacman-utils.el
index db0bbe5a83..3ff2903462 100644
--- a/pacman-utils.el
+++ b/pacman-utils.el
@@ -42,6 +42,14 @@
keys))
,@body)))
+(defun plist-map (plist property transformer)
+ "Transform the value of PROPERTY in PLIST with TRANSFORMER.
+This function modifies plist with plist-put. So it does the same
+side-effects."
+ (plist-bind ((value property)) plist
+ (plist-put plist property
+ (funcall transformer value))))
+
(provide 'pacman-utils)
;;; pacman.el ends here
- [nongnu] elpa/pacmacs e4e4053c26 306/472: Ghost terrified time as constant (#159), (continued)
- [nongnu] elpa/pacmacs e4e4053c26 306/472: Ghost terrified time as constant (#159), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 1978363e9d 310/472: Fix handle-ghost-blinking-threshold (#159), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs a896a83366 312/472: Merge pull request #164 from codingteam/blink-almost-timed-out-159, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs d3c94de6da 320/472: Remove UT for pacmacs--track-point (#159), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 8b40dc51cf 330/472: Add 1st big pill level (#162), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 49292e34d3 342/472: UT for terrified-ghost-timed-out-p function (#171), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 40a3d00209 367/472: Implement glowing walls (#138), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 5c45e17c40 399/472: Add docs for destroy function (#134), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs f79355209d 060/472: Refactor out functions for creating images (#51), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 080aae5f08 070/472: Use plist-bind for pacman-anim-next-frame function (#54), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 1e1cebe39a 073/472: Introduce plist-map utility function (#54),
ELPA Syncer <=
- [nongnu] elpa/pacmacs ba7ad0349d 082/472: Rename pacman to pacmacs. Close #66, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs c447091a19 085/472: Fix description in the game headers, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs e85c81b077 090/472: Enable entire code base for coverage (#70), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs e3d914a1ea 097/472: Dropping support for Emacs 24.1 and 24.2. Close #71, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 4b08605994 093/472: UTs for duration frame logic. Close #60, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs c865fda214 120/472: Merge branch 'board-refactoring-74'. Close #74, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 7e8970628c 122/472: Add sprites for Pacman Death animation. Close #44, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 99a90b9c87 125/472: Fix the tunneling effect. Close #88, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs d49cb4afe3 128/472: Fix misspelling of the word `life` in single form, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 22dd5e5cf9 133/472: Rename pacmacs--detect-ghost-collision function (#97), ELPA Syncer, 2022/01/06