[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/pacmacs bd5970816f 002/472: Check if the killing buffer is
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/pacmacs bd5970816f 002/472: Check if the killing buffer is ours. Close #1 |
Date: |
Thu, 6 Jan 2022 21:59:00 -0500 (EST) |
branch: elpa/pacmacs
commit bd5970816f38d0a1585c282810ce9fb58cfdfb9e
Author: rexim <reximkut@gmail.com>
Commit: rexim <reximkut@gmail.com>
Check if the killing buffer is ours. Close #1
---
pacman.el | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/pacman.el b/pacman.el
index f3b648c999..1cf568986c 100644
--- a/pacman.el
+++ b/pacman.el
@@ -9,7 +9,7 @@
(define-key pacman-mode-map (kbd "<left>") 'pacman-left)
(define-key pacman-mode-map (kbd "<right>") 'pacman-right)
(define-key pacman-mode-map (kbd "q") 'pacman-quit)
- (add-hook 'kill-buffer-hook 'pacman-destroy))
+ (add-hook 'kill-buffer-hook 'pacman-kill-buffer-hook))
(defun pacman-start ()
(interactive)
@@ -18,6 +18,13 @@
(unless pacman-timer
(setq pacman-timer (run-at-time nil 0.1 'pacman-tick))))
+(defun pacman-kill-buffer-hook ()
+ (interactive)
+ (when (string= pacman-buffer-name
+ (buffer-name (current-buffer)))
+ (message (format "Buffer name: %s" (buffer-name (current-buffer))))
+ (pacman-destroy)))
+
(defun pacman-destroy ()
(when pacman-timer
(cancel-timer pacman-timer)
- [nongnu] branch elpa/pacmacs created (now 25a8c30210), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs bd5970816f 002/472: Check if the killing buffer is ours. Close #1,
ELPA Syncer <=
- [nongnu] elpa/pacmacs 6124aa2061 009/472: Fix Copyright year, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 2d818f9a49 006/472: Implement rendering of game state. Close #8, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 3ff080432f 015/472: Extract pacman-resources module (#19), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs b8fce3e847 028/472: Add UT for pacman-convert-aseprite-frame function (#22), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 179ea99635 021/472: Add our own sprites. Close #13, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs d0dc2eff12 027/472: Ad UT for pacman-anim-object-next-frame function (#22), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs abb1f366fb 031/472: Merge branch 'uts-for-aseprite-animation-support-22'. Close #22, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs fe05829cd3 004/472: Fix kill buffer problem. Close #7, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 0a532ddc58 011/472: Add gitignore, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 96ad2016a1 001/472: Add initial code for pacman game, ELPA Syncer, 2022/01/06