diff options
| author | Juanma Barranquero | 2002-03-22 09:44:45 +0000 |
|---|---|---|
| committer | Juanma Barranquero | 2002-03-22 09:44:45 +0000 |
| commit | 6e71749d98c98d2a4f51d1f01e5aa22a352e55e4 (patch) | |
| tree | ea8cc89529f7646778e2fe6915248478be6cee8b | |
| parent | 898a52c9c02e9efba8f16acf934dc918c66adc6e (diff) | |
| download | emacs-6e71749d98c98d2a4f51d1f01e5aa22a352e55e4.tar.gz emacs-6e71749d98c98d2a4f51d1f01e5aa22a352e55e4.zip | |
(gomoku-font-lock-O-face): Convert to use `defface'.
(gomoku-font-lock-X-face): Likewise.
(gomoku-font-lock-keywords): Use faces instead of variables.
| -rw-r--r-- | lisp/ChangeLog | 6 | ||||
| -rw-r--r-- | lisp/play/gomoku.el | 24 |
2 files changed, 16 insertions, 14 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f0a34fbe4b0..1970a8b135c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2002-03-22 Juanma Barranquero <lektu@terra.es> | ||
| 2 | |||
| 3 | * play/gomoku.el (gomoku-font-lock-O-face): Convert to use `defface'. | ||
| 4 | (gomoku-font-lock-X-face): Likewise. | ||
| 5 | (gomoku-font-lock-keywords): Use faces instead of variables. | ||
| 6 | |||
| 1 | 2002-03-21 Stefan Monnier <monnier@cs.yale.edu> | 7 | 2002-03-21 Stefan Monnier <monnier@cs.yale.edu> |
| 2 | 8 | ||
| 3 | * Makefile.in (bootstrap): Make sure subdirs.el is ready. | 9 | * Makefile.in (bootstrap): Make sure subdirs.el is ready. |
diff --git a/lisp/play/gomoku.el b/lisp/play/gomoku.el index 9096d4be790..888dfe34ba0 100644 --- a/lisp/play/gomoku.el +++ b/lisp/play/gomoku.el | |||
| @@ -163,26 +163,22 @@ One useful value to include is `turn-on-font-lock' to highlight the pieces." | |||
| 163 | (defvar gomoku-emacs-won () | 163 | (defvar gomoku-emacs-won () |
| 164 | "For making font-lock use the winner's face for the line.") | 164 | "For making font-lock use the winner's face for the line.") |
| 165 | 165 | ||
| 166 | (defcustom gomoku-font-lock-O-face | 166 | (defface gomoku-font-lock-O-face |
| 167 | (if (display-color-p) | 167 | '((((class color)) (:foreground "red" :weight bold))) |
| 168 | (list (facemenu-get-face 'fg:red) 'bold)) | 168 | "Face to use for Emacs' O." |
| 169 | "*Face to use for Emacs' O." | ||
| 170 | :type '(repeat face) | ||
| 171 | :group 'gomoku) | 169 | :group 'gomoku) |
| 172 | 170 | ||
| 173 | (defcustom gomoku-font-lock-X-face | 171 | (defface gomoku-font-lock-X-face |
| 174 | (if (display-color-p) | 172 | '((((class color)) (:foreground "green" :weight bold))) |
| 175 | (list (facemenu-get-face 'fg:green) 'bold)) | 173 | "Face to use for your X." |
| 176 | "*Face to use for your X." | ||
| 177 | :type '(repeat face) | ||
| 178 | :group 'gomoku) | 174 | :group 'gomoku) |
| 179 | 175 | ||
| 180 | (defvar gomoku-font-lock-keywords | 176 | (defvar gomoku-font-lock-keywords |
| 181 | '(("O" . gomoku-font-lock-O-face) | 177 | '(("O" . 'gomoku-font-lock-O-face) |
| 182 | ("X" . gomoku-font-lock-X-face) | 178 | ("X" . 'gomoku-font-lock-X-face) |
| 183 | ("[-|/\\]" 0 (if gomoku-emacs-won | 179 | ("[-|/\\]" 0 (if gomoku-emacs-won |
| 184 | gomoku-font-lock-O-face | 180 | 'gomoku-font-lock-O-face |
| 185 | gomoku-font-lock-X-face))) | 181 | 'gomoku-font-lock-X-face))) |
| 186 | "*Font lock rules for Gomoku.") | 182 | "*Font lock rules for Gomoku.") |
| 187 | 183 | ||
| 188 | (put 'gomoku-mode 'front-sticky | 184 | (put 'gomoku-mode 'front-sticky |