]> code.delx.au - gnu-emacs/commitdiff
Use defface instead of facemenu-get-face.
authorEli Zaretskii <eliz@gnu.org>
Sun, 10 Mar 2002 17:28:58 +0000 (17:28 +0000)
committerEli Zaretskii <eliz@gnu.org>
Sun, 10 Mar 2002 17:28:58 +0000 (17:28 +0000)
lisp/ChangeLog
lisp/play/mpuz.el

index 0d8ee58d83e93537b5a8f1c06f3414862e5e4b47..343b629d72de8e6ab7dbea7e48d64cfe9ee2e9e9 100644 (file)
@@ -1,3 +1,7 @@
+2002-03-10  Daniel Pfeiffer  <occitan@esperanto.org>
+
+       * play/mpuz.el: Use defface instead of facemenu-get-face.
+
 2002-03-10  Jan D.  <Jan.Djarv@mbox200.swipnet.se>
 
        * startup.el (command-line): Add call to emacs-session-restore if
index a021ddd3544b133f2abfb376e4c593107ee44fe3..63de2bcb2d9ce073c4a2249229ac7f9dda89ba83 100644 (file)
   :type 'boolean
   :group 'mpuz)
 
-(defcustom mpuz-unsolved-face
-  `(,(facemenu-get-face 'fg:red) bold)
+(defface mpuz-unsolved-face
+  '((((class color)) (:foreground "red1" :bold t))
+    (t (:bold t)))
   "*Face to use for letters to be solved."
-  :type '(repeat face)
   :group 'mpuz)
 
-(defcustom mpuz-solved-face
-  `(,(facemenu-get-face 'fg:green) bold)
+(defface mpuz-solved-face
+  '((((class color)) (:foreground "green1" :bold t))
+    (t (:bold t)))
   "*Face to use for solved digits."
-  :type '(repeat face)
   :group 'mpuz)
 
-(defcustom mpuz-trivial-face
-  `(,(facemenu-get-face 'fg:blue) bold)
+(defface mpuz-trivial-face
+  '((((class color)) (:foreground "blue" :bold t))
+    (t (:bold t)))
   "*Face to use for trivial digits solved for you."
-  :type '(repeat face)
   :group 'mpuz)
 
-(defcustom mpuz-text-face
-  '(variable-pitch)
+(defface mpuz-text-face
+  '((t (:inherit variable-pitch)))
   "*Face to use for text on right."
-  :type '(repeat face)
   :group 'mpuz)
 
 \f
@@ -296,7 +295,7 @@ You may abort a game by typing \\<mpuz-mode-map>\\[mpuz-offer-abort]."
 (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-face))
        buffer-read-only)
     (save-excursion
       (set-buffer buf)
@@ -347,9 +346,9 @@ You may abort a game by typing \\<mpuz-mode-map>\\[mpuz-offer-abort]."
                  (+ 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-face)
+                      ((aref mpuz-found-digits digit) 'mpuz-solved-face)
+                      ('mpuz-unsolved-face))))
        buffer-read-only)
     (mapc (lambda (square)
            (goto-line (car square))    ; line before column!