[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/pacmacs 39fc09baf3 161/472: Load cl-lib.el for using its m
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/pacmacs 39fc09baf3 161/472: Load cl-lib.el for using its macros and functions |
Date: |
Thu, 6 Jan 2022 21:59:21 -0500 (EST) |
branch: elpa/pacmacs
commit 39fc09baf373e717acea01fd37dae47dc43794df
Author: Syohei YOSHIDA <syohex@gmail.com>
Commit: Syohei YOSHIDA <syohex@gmail.com>
Load cl-lib.el for using its macros and functions
---
pacmacs-utils.el | 4 +++-
pacmacs.el | 43 ++++++++++++++++++++++---------------------
2 files changed, 25 insertions(+), 22 deletions(-)
diff --git a/pacmacs-utils.el b/pacmacs-utils.el
index 19fb56a68a..3f2cfd4fc9 100644
--- a/pacmacs-utils.el
+++ b/pacmacs-utils.el
@@ -32,11 +32,13 @@
;;; Code:
+(require 'cl-lib)
+
(defconst pacmacs--base (file-name-directory load-file-name))
(defmacro plist-bind (keys expr &rest body)
(declare (indent 2) (debug (sexp form &rest form)))
- (let ((expr-name (gensym)))
+ (let ((expr-name (cl-gensym)))
`(let* ((,expr-name ,expr)
,@(mapcar #'(lambda (key)
(cons (car key)
diff --git a/pacmacs.el b/pacmacs.el
index e4759dda13..2d8a018603 100644
--- a/pacmacs.el
+++ b/pacmacs.el
@@ -35,6 +35,7 @@
;;; Code:
+(require 'cl-lib)
(require 'dash)
(require 'pacmacs-anim)
@@ -268,7 +269,7 @@
(column (cdr p))
(possible-ways (pacmacs--possible-ways row column))
(candidate-ways
- (remove-if #'pacmacs--filter-candidates possible-ways)))
+ (cl-remove-if #'pacmacs--filter-candidates possible-ways)))
(dolist (candidate-way candidate-ways)
(pacmacs--track-point candidate-way p))
(setq next-wave
@@ -312,13 +313,13 @@
(-when-let (pill (pacmacs--pill-at-p row column))
(setq pacmacs-score (+ pacmacs-score 10))
(setq pacmacs-pills
- (remove-if #'(lambda (pill)
- (plist-bind ((p-row :row)
- (p-column :column))
- pill
- (and (= row p-row)
- (= column p-column))))
- pacmacs-pills)))))
+ (cl-remove-if #'(lambda (pill)
+ (plist-bind ((p-row :row)
+ (p-column :column))
+ pill
+ (and (= row p-row)
+ (= column p-column))))
+ pacmacs-pills)))))
(defun pacmacs--ghost-collision-p ()
(plist-bind ((row :row)
@@ -361,8 +362,8 @@
(defun pacmacs-waiting-logic (switcher)
(if (<= pacmacs-waiting-counter 0)
(funcall switcher)
- (decf pacmacs-waiting-counter
- pacmacs-tick-duration-ms)))
+ (cl-decf pacmacs-waiting-counter
+ pacmacs-tick-duration-ms)))
(defun pacmacs--put-object (anim-object)
(when anim-object
@@ -373,7 +374,7 @@
(defun pacmacs--switch-to-death-state ()
(setq pacmacs-game-state 'death)
- (decf pacmacs-lives)
+ (cl-decf pacmacs-lives)
(plist-put pacmacs-player-state :current-animation
(pacmacs-load-anim "Pacman-Death")))
@@ -486,20 +487,20 @@
(setq pacmacs-ghosts nil)
(setq pacmacs-player-state nil)
- (loop
+ (cl-loop
for line being the element of lines using (index row)
- do (loop for x being the element of line using (index column)
- do (cond ((char-equal x ?#)
- (add-to-list 'pacmacs-wall-cells
(pacmacs--make-wall-cell row column)))
+ do (cl-loop for x being the element of line using (index column)
+ do (cond ((char-equal x ?#)
+ (add-to-list 'pacmacs-wall-cells
(pacmacs--make-wall-cell row column)))
- ((char-equal x ?.)
- (add-to-list 'pacmacs-pills (pacmacs--make-pill row
column)))
+ ((char-equal x ?.)
+ (add-to-list 'pacmacs-pills (pacmacs--make-pill row
column)))
- ((char-equal x ?o)
- (setq pacmacs-player-state (pacmacs--make-player row
column)))
+ ((char-equal x ?o)
+ (setq pacmacs-player-state (pacmacs--make-player
row column)))
- ((char-equal x ?g)
- (add-to-list 'pacmacs-ghosts (pacmacs--make-ghost row
column))))))))
+ ((char-equal x ?g)
+ (add-to-list 'pacmacs-ghosts (pacmacs--make-ghost
row column))))))))
(provide 'pacmacs)
- [nongnu] elpa/pacmacs 4341b23d87 094/472: Implement wraparound. Close #67, (continued)
- [nongnu] elpa/pacmacs 4341b23d87 094/472: Implement wraparound. Close #67, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 12942ddeff 113/472: Refactor out pacmacs--fill-board (#74), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 91408c074d 115/472: Refactor pacmacs--track-object (#74), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs ed40addf95 116/472: Refactor pacmacs--put-object (#74), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs eac9d47c62 117/472: Refactor pacmacs-render-track-board (#74), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs d763bd0f82 121/472: Fix the UTs, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 9527a965e1 134/472: Merge branch 'switch-game-state-in-logic-functions-97'. Close #97, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 86f76c4bef 129/472: Implement switching level mechanics. Close #79, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs fa41daf2ca 149/472: Merge branch 'master' into score-table-92, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 85069784fb 147/472: Add a couple of new maps., ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 39fc09baf3 161/472: Load cl-lib.el for using its macros and functions,
ELPA Syncer <=
- [nongnu] elpa/pacmacs 9ddaedae20 174/472: UT for pacmacs--file-content-test, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs b6141dc8e3 175/472: UT for pacmacs--anim-object-list-next-frame, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 1186dcdaa1 197/472: Double dash pacmacs-render-state function (#126), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 57b0e8566b 204/472: Get pacmacs-quit back, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 531386d7f1 208/472: Merge pull request #128 from rexim/readme-fix, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 775a2d3ec5 211/472: Convert recorder module to a tool (#115), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs a0d9c1bbbc 212/472: Reverse test case before saving (#115), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs d5bdd0b20a 025/472: Slightly refactored pacman-anim:, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 16b0d6583a 153/472: Get rid of the hardcoded level list. Close #109, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 68f6dc9a93 167/472: Update MELPA repo link, ELPA Syncer, 2022/01/06