[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/pacmacs 0126187ee8 428/472: Merge pull request #197 from c
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/pacmacs 0126187ee8 428/472: Merge pull request #197 from codingteam/sorting-score-table-on-read-write-194 |
Date: |
Thu, 6 Jan 2022 21:59:45 -0500 (EST) |
branch: elpa/pacmacs
commit 0126187ee8ddedb8cb6982696bd0dba8886adcdb
Merge: 0eeb82ebc9 0d62e0346a
Author: Alexey Kutepov <reximkut@gmail.com>
Commit: Alexey Kutepov <reximkut@gmail.com>
Merge pull request #197 from
codingteam/sorting-score-table-on-read-write-194
Sorting score table on read write
---
pacmacs-score.el | 20 ++++++++++----------
pacmacs.el | 3 +--
2 files changed, 11 insertions(+), 12 deletions(-)
diff --git a/pacmacs-score.el b/pacmacs-score.el
index 17f50f0588..50b1381eb9 100644
--- a/pacmacs-score.el
+++ b/pacmacs-score.el
@@ -50,21 +50,23 @@
(let ((inhibit-read-only t))
(erase-buffer)
(-> (pacmacs--read-score-table)
- (pacmacs--sort-score-table)
(pacmacs--render-score-table)))))
(defun pacmacs--read-score-table ()
(when (file-exists-p pacmacs--score-file-name)
- (-> pacmacs--score-file-name
- (f-read-text)
- (read-from-string)
- (car))))
+ (->> pacmacs--score-file-name
+ (f-read-text)
+ (read-from-string)
+ (car)
+ (pacmacs--sort-score-table))))
(defun pacmacs--write-score-table (score-table)
(with-temp-buffer
- (-> score-table
- (pp-to-string)
- (insert))
+ (->> score-table
+ (pacmacs--sort-score-table)
+ (-take pacmacs--max-score-table-size)
+ (pp-to-string)
+ (insert))
(write-file pacmacs--score-file-name)))
(defun pacmacs--sort-score-table (score-table)
@@ -83,8 +85,6 @@
(defun pacmacs--add-entry-to-score-table (nickname score)
(->> (pacmacs--read-score-table)
(cons (cons nickname score))
- (pacmacs--sort-score-table)
- (-take pacmacs--max-score-table-size)
(pacmacs--write-score-table)))
(defun pacmacs--render-score-record (record)
diff --git a/pacmacs.el b/pacmacs.el
index 2e5df3a255..0ac35b98d8 100644
--- a/pacmacs.el
+++ b/pacmacs.el
@@ -585,8 +585,7 @@
(with-current-buffer pacmacs-buffer-name
(goto-char (point-max))
- (let* ((score-table (pacmacs--sort-score-table
- (pacmacs--read-score-table)))
+ (let* ((score-table (pacmacs--read-score-table))
(new-score-position (pacmacs--position-of-new-score
score-table
pacmacs-score)))
- [nongnu] elpa/pacmacs 402d176003 339/472: Remove unused functions (#171), (continued)
- [nongnu] elpa/pacmacs 402d176003 339/472: Remove unused functions (#171), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 71b977fd22 343/472: Transform it-recorder.el to an additional module, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs ad5cdc8efd 349/472: Add att.txt to gitignore, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 8d63cc3f30 358/472: Multicolor walls (#138), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs aed2853780 373/472: Move wall weight to the constants (#138), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 8166e4d3d7 363/472: Merge pull request #181 from codingteam/terrified-timer-reset-173, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 4679fcef60 381/472: Fix put-horizontal-bar UT (#138), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs b96be7f8d8 402/472: Fix text read only problem (#134), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 8836f12761 410/472: Kill the game buffer on initialization (#134), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 689c09287c 423/472: Add UT for step-ghosts func, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 0126187ee8 428/472: Merge pull request #197 from codingteam/sorting-score-table-on-read-write-194,
ELPA Syncer <=
- [nongnu] elpa/pacmacs 988c61b190 432/472: Load leves from custom folder (#191), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 23d315e54f 437/472: Trigger MELPA update, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 66dd6b0aee 446/472: Enable truncate lines for score table (#203), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 25385d9337 458/472: Add toggle-debug-output function, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs e7abee5bd3 091/472: Lazy init of empty cell (#70), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs af3407e676 047/472: Sprite sheets as part of anim object. Close #24, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs edf7b2d1b3 069/472: Use plist-bind macro for pacman-anim-get-frame (#54), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 61b07fd669 252/472: Add some screenshot of the latest version, ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs f1f7f6f407 256/472: Animated big pills (#81), ELPA Syncer, 2022/01/06
- [nongnu] elpa/pacmacs 69437be130 259/472: Extra points for eating big pills (#81), ELPA Syncer, 2022/01/06