diff options
Diffstat (limited to 'lisp/play/gomoku.el')
| -rw-r--r-- | lisp/play/gomoku.el | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/lisp/play/gomoku.el b/lisp/play/gomoku.el index 69ec07496d5..611c095fbd1 100644 --- a/lisp/play/gomoku.el +++ b/lisp/play/gomoku.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; gomoku.el --- Gomoku game between you and Emacs | 1 | ;;; gomoku.el --- Gomoku game between you and Emacs |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1988, 1994, 1996, 2001, 2003 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1988, 1994, 1996, 2001, 2003, 2005 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Philippe Schnoebelen <phs@lsv.ens-cachan.fr> | 5 | ;; Author: Philippe Schnoebelen <phs@lsv.ens-cachan.fr> |
| 6 | ;; Maintainer: FSF | 6 | ;; Maintainer: FSF |
| @@ -160,22 +160,24 @@ One useful value to include is `turn-on-font-lock' to highlight the pieces." | |||
| 160 | (defvar gomoku-emacs-won () | 160 | (defvar gomoku-emacs-won () |
| 161 | "For making font-lock use the winner's face for the line.") | 161 | "For making font-lock use the winner's face for the line.") |
| 162 | 162 | ||
| 163 | (defface gomoku-font-lock-O-face | 163 | (defface gomoku-O |
| 164 | '((((class color)) (:foreground "red" :weight bold))) | 164 | '((((class color)) (:foreground "red" :weight bold))) |
| 165 | "Face to use for Emacs' O." | 165 | "Face to use for Emacs' O." |
| 166 | :group 'gomoku) | 166 | :group 'gomoku) |
| 167 | ;; backward-compatibility alias | ||
| 168 | (put 'gomoku-font-lock-O-face 'face-alias 'gomoku-O) | ||
| 167 | 169 | ||
| 168 | (defface gomoku-font-lock-X-face | 170 | (defface gomoku-X |
| 169 | '((((class color)) (:foreground "green" :weight bold))) | 171 | '((((class color)) (:foreground "green" :weight bold))) |
| 170 | "Face to use for your X." | 172 | "Face to use for your X." |
| 171 | :group 'gomoku) | 173 | :group 'gomoku) |
| 174 | ;; backward-compatibility alias | ||
| 175 | (put 'gomoku-font-lock-X-face 'face-alias 'gomoku-X) | ||
| 172 | 176 | ||
| 173 | (defvar gomoku-font-lock-keywords | 177 | (defvar gomoku-font-lock-keywords |
| 174 | '(("O" . 'gomoku-font-lock-O-face) | 178 | '(("O" . 'gomoku-O) |
| 175 | ("X" . 'gomoku-font-lock-X-face) | 179 | ("X" . 'gomoku-X) |
| 176 | ("[-|/\\]" 0 (if gomoku-emacs-won | 180 | ("[-|/\\]" 0 (if gomoku-emacs-won 'gomoku-O 'gomoku-X))) |
| 177 | 'gomoku-font-lock-O-face | ||
| 178 | 'gomoku-font-lock-X-face))) | ||
| 179 | "*Font lock rules for Gomoku.") | 181 | "*Font lock rules for Gomoku.") |
| 180 | 182 | ||
| 181 | (put 'gomoku-mode 'front-sticky | 183 | (put 'gomoku-mode 'front-sticky |