emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/pacmacs 2425a26d88 364/472: Use push instead of add-to-lis


From: ELPA Syncer
Subject: [nongnu] elpa/pacmacs 2425a26d88 364/472: Use push instead of add-to-list (#182)
Date: Thu, 6 Jan 2022 21:59:39 -0500 (EST)

branch: elpa/pacmacs
commit 2425a26d8890258afe138c927a9bc4b9058603f5
Author: rexim <reximkut@gmail.com>
Commit: rexim <reximkut@gmail.com>

    Use push instead of add-to-list (#182)
---
 pacmacs.el          | 12 ++++++------
 tools/pacmacs-rr.el |  9 ++++-----
 2 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/pacmacs.el b/pacmacs.el
index 84e60017cc..4f79cf8427 100644
--- a/pacmacs.el
+++ b/pacmacs.el
@@ -450,8 +450,8 @@
 (defun pacmacs--unterrify-timed-out-ghosts ()
   (dolist (terrified-ghost (-filter #'pacmacs--terrified-ghost-timed-out-p
                                     pacmacs--terrified-ghosts))
-    (add-to-list 'pacmacs--ghosts
-                 (pacmacs--unterrify-ghost terrified-ghost)))
+    (push (pacmacs--unterrify-ghost terrified-ghost)
+          pacmacs--ghosts))
 
   (setq pacmacs--terrified-ghosts
         (-remove #'pacmacs--terrified-ghost-timed-out-p
@@ -697,19 +697,19 @@
      for line being the element of lines using (index row)
      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)))
+                           (push (pacmacs--make-wall-cell row column) 
pacmacs--wall-cells))
 
                           ((char-equal x ?.)
-                           (add-to-list 'pacmacs--pills 
(pacmacs--make-regular-pill row column)))
+                           (push (pacmacs--make-regular-pill row column) 
pacmacs--pills))
 
                           ((char-equal x ?+)
-                           (add-to-list 'pacmacs--pills 
(pacmacs--make-big-pill row column)))
+                           (push (pacmacs--make-big-pill row column) 
pacmacs--pills))
 
                           ((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))))))
+                           (push (pacmacs--make-ghost row column) 
pacmacs--ghosts)))))
 
     (pacmacs--fill-object-board)
 
diff --git a/tools/pacmacs-rr.el b/tools/pacmacs-rr.el
index dfef184645..b85b0b3a78 100644
--- a/tools/pacmacs-rr.el
+++ b/tools/pacmacs-rr.el
@@ -45,8 +45,8 @@
 (defvar pacmacs-replay-finished-hook nil)
 
 (defun pacmacs--record-action (action-name)
-  (add-to-list 'pacmacs--recorded-actions
-               (cons action-name pacmacs--tick-counter)))
+  (push (cons action-name pacmacs--tick-counter)
+        pacmacs--recorded-actions))
 
 (defun pacmacs--reset-recorder ()
   (setq pacmacs--tick-counter 0)
@@ -94,9 +94,8 @@
 (defun pacmacs-replay-tick ()
   (cl-incf pacmacs--tick-counter)
 
-  (add-to-list 'pacmacs--tick-times
-               (pacmacs--measure-time
-                (pacmacs-tick)))
+  (push (pacmacs--measure-time (pacmacs-tick))
+        pacmacs--tick-times)
 
   (if pacmacs--recorded-actions
       (-let ((((action . tick-number) . _) pacmacs--recorded-actions))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]