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

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

[nongnu] elpa/pacmacs 470f11b433 357/472: Reset terrified timer on eatin


From: ELPA Syncer
Subject: [nongnu] elpa/pacmacs 470f11b433 357/472: Reset terrified timer on eating BP (#173)
Date: Thu, 6 Jan 2022 21:59:39 -0500 (EST)

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

    Reset terrified timer on eating BP (#173)
---
 pacmacs.el | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/pacmacs.el b/pacmacs.el
index 03356b11d1..2472f010be 100644
--- a/pacmacs.el
+++ b/pacmacs.el
@@ -430,6 +430,12 @@
              pacmacs--ghost-terrified-time-ms)
   ghost)
 
+(defun pacmacs--reset-terrified-ghost (terrified-ghost)
+  (plist-put terrified-ghost
+             :terrified-timer pacmacs--ghost-terrified-time-ms)
+  (plist-put terrified-ghost
+             :current-animation (pacmacs-load-anim "Terrified-Ghost")))
+
 (defun pacmacs--unterrify-ghost (terrified-ghost)
   (plist-put terrified-ghost :switch-direction-callback
              (pacmacs--switch-direction-animation-callback "Red-Ghost"))
@@ -442,7 +448,10 @@
   (dolist (ghost pacmacs--ghosts)
     (add-to-list 'pacmacs--terrified-ghosts
                  (pacmacs--terrify-ghost ghost)))
-  (setq pacmacs--ghosts nil))
+  (setq pacmacs--ghosts nil)
+
+  (dolist (terrified-ghost pacmacs--terrified-ghosts)
+    (pacmacs--reset-terrified-ghost terrified-ghost)))
 
 (defun pacmacs--unterrify-timed-out-ghosts ()
   (dolist (terrified-ghost (-filter #'pacmacs--terrified-ghost-timed-out-p



reply via email to

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