aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/play/mpuz.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/play/mpuz.el')
-rw-r--r--lisp/play/mpuz.el24
1 files changed, 16 insertions, 8 deletions
diff --git a/lisp/play/mpuz.el b/lisp/play/mpuz.el
index 849e87a28b0..e354da6a04b 100644
--- a/lisp/play/mpuz.el
+++ b/lisp/play/mpuz.el
@@ -57,28 +57,36 @@ t means never ding, and `error' means only ding on wrong input."
57 :type 'boolean 57 :type 'boolean
58 :group 'mpuz) 58 :group 'mpuz)
59 59
60(defface mpuz-unsolved-face 60(defface mpuz-unsolved
61 '((((class color)) (:foreground "red1" :bold t)) 61 '((((class color)) (:foreground "red1" :bold t))
62 (t (:bold t))) 62 (t (:bold t)))
63 "*Face to use for letters to be solved." 63 "*Face to use for letters to be solved."
64 :group 'mpuz) 64 :group 'mpuz)
65;; backward-compatibility alias
66(put 'mpuz-unsolved-face 'face-alias 'mpuz-unsolved)
65 67
66(defface mpuz-solved-face 68(defface mpuz-solved
67 '((((class color)) (:foreground "green1" :bold t)) 69 '((((class color)) (:foreground "green1" :bold t))
68 (t (:bold t))) 70 (t (:bold t)))
69 "*Face to use for solved digits." 71 "*Face to use for solved digits."
70 :group 'mpuz) 72 :group 'mpuz)
73;; backward-compatibility alias
74(put 'mpuz-solved-face 'face-alias 'mpuz-solved)
71 75
72(defface mpuz-trivial-face 76(defface mpuz-trivial
73 '((((class color)) (:foreground "blue" :bold t)) 77 '((((class color)) (:foreground "blue" :bold t))
74 (t (:bold t))) 78 (t (:bold t)))
75 "*Face to use for trivial digits solved for you." 79 "*Face to use for trivial digits solved for you."
76 :group 'mpuz) 80 :group 'mpuz)
81;; backward-compatibility alias
82(put 'mpuz-trivial-face 'face-alias 'mpuz-trivial)
77 83
78(defface mpuz-text-face 84(defface mpuz-text
79 '((t (:inherit variable-pitch))) 85 '((t (:inherit variable-pitch)))
80 "*Face to use for text on right." 86 "*Face to use for text on right."
81 :group 'mpuz) 87 :group 'mpuz)
88;; backward-compatibility alias
89(put 'mpuz-text-face 'face-alias 'mpuz-text)
82 90
83 91
84;; Mpuz mode and keymaps 92;; Mpuz mode and keymaps
@@ -296,7 +304,7 @@ You may abort a game by typing \\<mpuz-mode-map>\\[mpuz-offer-abort]."
296(defun mpuz-create-buffer () 304(defun mpuz-create-buffer ()
297 "Create (or recreate) the puzzle buffer. Return it." 305 "Create (or recreate) the puzzle buffer. Return it."
298 (let ((buf (get-buffer-create "*Mult Puzzle*")) 306 (let ((buf (get-buffer-create "*Mult Puzzle*"))
299 (face '(face mpuz-text-face)) 307 (face '(face mpuz-text))
300 buffer-read-only) 308 buffer-read-only)
301 (save-excursion 309 (save-excursion
302 (set-buffer buf) 310 (set-buffer buf)
@@ -347,9 +355,9 @@ You may abort a game by typing \\<mpuz-mode-map>\\[mpuz-offer-abort]."
347 (+ digit ?0) 355 (+ digit ?0)
348 (+ (mpuz-to-letter digit) ?A))) 356 (+ (mpuz-to-letter digit) ?A)))
349 (face `(face 357 (face `(face
350 ,(cond ((aref mpuz-trivial-digits digit) 'mpuz-trivial-face) 358 ,(cond ((aref mpuz-trivial-digits digit) 'mpuz-trivial)
351 ((aref mpuz-found-digits digit) 'mpuz-solved-face) 359 ((aref mpuz-found-digits digit) 'mpuz-solved)
352 ('mpuz-unsolved-face)))) 360 ('mpuz-unsolved))))
353 buffer-read-only) 361 buffer-read-only)
354 (mapc (lambda (square) 362 (mapc (lambda (square)
355 (goto-line (car square)) ; line before column! 363 (goto-line (car square)) ; line before column!