branch: elpa/pacmacs commit 76f2dbe41b4af6d53cda77e348bc757b8d1f2682 Author: rexim <[email protected]> Commit: rexim <[email protected]>
Do nick padding inside of the widget (#134)
It is more safe and allows to get read of inhibit-read-only approach.
---
pacmacs.el | 19 ++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)
diff --git a/pacmacs.el b/pacmacs.el
index 34e997d899..03ee93537c 100644
--- a/pacmacs.el
+++ b/pacmacs.el
@@ -111,7 +111,7 @@
(setq pacmacs-game-over-state-rendered nil)
(setq pacmacs-lives 3)
- (setq pacmacs-score 0)
+ (setq pacmacs-score 4000)
(setq pacmacs-levels (pacmacs--get-list-of-levels))
(setq pacmacs-current-level 0)
@@ -592,14 +592,15 @@
(pacmacs--add-entry-to-score-table
nickname
pacmacs-score)
- (widget-delete widget)
- (let ((inhibit-read-only t))
- (insert (format "%s"
- (make-string
- (max 0
- (-
pacmacs--max-score-nick-size
-
(length nickname)))
- ?\s))))))
+ (widget-value-set widget
+ (format "%s%s"
+ nickname
+
(make-string
+ (max 0
+
(- pacmacs--max-score-nick-size
+
(length nickname)))
+ ?\s)))
+ (widget-delete widget)))
""))
(insert (format " %d\n" pacmacs-score))
