[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/pacmacs a12795e835 455/472: Introduce pacmacs-scores-mode
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/pacmacs a12795e835 455/472: Introduce pacmacs-scores-mode (#203) |
Date: |
Thu, 6 Jan 2022 21:59:48 -0500 (EST) |
branch: elpa/pacmacs
commit a12795e835cd29beffbfb995ea7081f43678fc11
Author: rexim <reximkut@gmail.com>
Commit: rexim <reximkut@gmail.com>
Introduce pacmacs-scores-mode (#203)
---
pacmacs-score.el | 6 ++++--
pacmacs.el | 14 ++++++++------
2 files changed, 12 insertions(+), 8 deletions(-)
diff --git a/pacmacs-score.el b/pacmacs-score.el
index ae323122df..724a3bf6c0 100644
--- a/pacmacs-score.el
+++ b/pacmacs-score.el
@@ -81,8 +81,10 @@
(defun pacmacs--render-score-page (render-score-sign)
(funcall render-score-sign)
- (-> (pacmacs--read-score-table)
- (pacmacs--render-score-table)))
+ (let ((score-table (pacmacs--read-score-table)))
+ (if score-table
+ (pacmacs--render-score-table score-table)
+ (insert "(there are not records yet)"))))
(defun pacmacs--render-score-table (score-table)
(-each score-table #'pacmacs--render-score-record))
diff --git a/pacmacs.el b/pacmacs.el
index 93ed5d1f4d..7fbdc8163c 100644
--- a/pacmacs.el
+++ b/pacmacs.el
@@ -111,6 +111,13 @@
(setq cursor-type nil)
(setq truncate-lines t))
+(define-derived-mode pacmacs-scores-mode special-mode "Pacmacs Scores"
+ (define-key pacmacs-game-over-mode-map (kbd "q")
+ (-partial #'pacmacs--kill-buffer-and-its-window
+ pacmacs--score-buffer-name))
+ (setq cursor-type nil)
+ (setq truncate-lines t))
+
;;;###autoload
(defun pacmacs-start ()
(interactive)
@@ -731,12 +738,7 @@
(interactive)
(switch-to-buffer pacmacs--score-buffer-name)
-
- (text-mode)
- (read-only-mode 1)
- (setq truncate-lines t)
- (setq cursor-type nil)
-
+ (pacmacs-scores-mode)
(pacmacs--load-map-sign "scores")
(with-render-target pacmacs--score-buffer-name
- [nongnu] elpa/pacmacs d6260cd30c 417/472: Refactor nickname submission action (#134), (continued)
- [nongnu] elpa/pacmacs d6260cd30c 417/472: Refactor nickname submission action (#134), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 71ffcfb208 419/472: Add UT for align-score-record-nickname func (#134), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 861aa9543e 422/472: Add UT for make-wall-cell func, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 2e881d27e0 424/472: Remove commented chunk of code (#134), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 1e4cbd5f4f 426/472: Sort score table on reading and writing (#194), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 0d62e0346a 427/472: Remove redundant score sorting (#194), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 9b2c497eb9 431/472: Handle error during level list loading (#191), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 2cf174ca7e 434/472: Create signs folder with game over sign (#191), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 7d4356c92c 445/472: Implement pacmacs-score-awesome (#203), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 0f4eb7aebf 452/472: Decouple score page render from sign render (#203), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs a12795e835 455/472: Introduce pacmacs-scores-mode (#203),
ELPA Syncer <=
- [nongnu] elpa/pacmacs cdae42dba5 461/472: Replace too specific function with composition, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 864fe2b02e 465/472: Bump the copyright year for all the files, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs edadbe5e53 469/472: Bump version to 0.1, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs db16fba9cd 470/472: Add missing license statement, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 98ce700143 023/472: Hide cursor in the game's buffer. Close #12, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 3070cf0e6a 063/472: Merge branch 'refactor-image-resource-51'. Close #51, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 1a678dfee7 110/472: Refactor out pacmacs--object-at-p (#74), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 5492ed0a87 118/472: Refactor pacmacs-render-state (#74), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs b5078d2632 141/472: Move most of the rendering stuff to pacman-render, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs a460cd8b06 148/472: Merge pull request #107 from rexim/feature/new-maps, ELPA Syncer, 2022/01/06