2005-06-10 Miles Bader <miles@gnu.org>
+ * play/mpuz.el (mpuz-unsolved, mpuz-solved, mpuz-trivial)
+ (mpuz-text): Remove "-face" suffix from face names.
+ (mpuz-unsolved-face, mpuz-solved-face, mpuz-trivial-face)
+ (mpuz-text-face): New backward-compatibility aliases for renamed faces.
+ (mpuz-create-buffer, mpuz-paint-digit): Use renamed mpuz faces.
+
* play/gomoku.el (gomoku-O, gomoku-X):
Remove "-face" suffix from face names.
(gomoku-font-lock-O-face, gomoku-font-lock-X-face):
:type 'boolean
:group 'mpuz)
-(defface mpuz-unsolved-face
+(defface mpuz-unsolved
'((((class color)) (:foreground "red1" :bold t))
(t (:bold t)))
"*Face to use for letters to be solved."
:group 'mpuz)
+;; backward-compatibility alias
+(put 'mpuz-unsolved-face 'face-alias 'mpuz-unsolved)
-(defface mpuz-solved-face
+(defface mpuz-solved
'((((class color)) (:foreground "green1" :bold t))
(t (:bold t)))
"*Face to use for solved digits."
:group 'mpuz)
+;; backward-compatibility alias
+(put 'mpuz-solved-face 'face-alias 'mpuz-solved)
-(defface mpuz-trivial-face
+(defface mpuz-trivial
'((((class color)) (:foreground "blue" :bold t))
(t (:bold t)))
"*Face to use for trivial digits solved for you."
:group 'mpuz)
+;; backward-compatibility alias
+(put 'mpuz-trivial-face 'face-alias 'mpuz-trivial)
-(defface mpuz-text-face
+(defface mpuz-text
'((t (:inherit variable-pitch)))
"*Face to use for text on right."
:group 'mpuz)
+;; backward-compatibility alias
+(put 'mpuz-text-face 'face-alias 'mpuz-text)
\f
;; Mpuz mode and keymaps
(defun mpuz-create-buffer ()
"Create (or recreate) the puzzle buffer. Return it."
(let ((buf (get-buffer-create "*Mult Puzzle*"))
- (face '(face mpuz-text-face))
+ (face '(face mpuz-text))
buffer-read-only)
(save-excursion
(set-buffer buf)
(+ digit ?0)
(+ (mpuz-to-letter digit) ?A)))
(face `(face
- ,(cond ((aref mpuz-trivial-digits digit) 'mpuz-trivial-face)
- ((aref mpuz-found-digits digit) 'mpuz-solved-face)
- ('mpuz-unsolved-face))))
+ ,(cond ((aref mpuz-trivial-digits digit) 'mpuz-trivial)
+ ((aref mpuz-found-digits digit) 'mpuz-solved)
+ ('mpuz-unsolved))))
buffer-read-only)
(mapc (lambda (square)
(goto-line (car square)) ; line before column!