]> code.delx.au - gnu-emacs/blobdiff - lisp/play/gomoku.el
(gnus-newsrc-file-version): Add defvar.
[gnu-emacs] / lisp / play / gomoku.el
index b640c1bbbd808adef544fe6de5f8e7f25136dca8..e9f7a07abe9d349ef8da9687ea6ecbbbf04d122c 100644 (file)
@@ -1,6 +1,7 @@
 ;;; gomoku.el --- Gomoku game between you and Emacs
 
-;; Copyright (C) 1988, 1994, 1996, 2001, 2003 Free Software Foundation, Inc.
+;; Copyright (C) 1988, 1994, 1996, 2001, 2002, 2003, 2004,
+;;   2005 Free Software Foundation, Inc.
 
 ;; Author: Philippe Schnoebelen <phs@lsv.ens-cachan.fr>
 ;; Maintainer: FSF
@@ -21,8 +22,8 @@
 
 ;; You should have received a copy of the GNU General Public License
 ;; along with GNU Emacs; see the file COPYING.  If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
 
 ;;; Commentary:
 
@@ -160,22 +161,20 @@ One useful value to include is `turn-on-font-lock' to highlight the pieces."
 (defvar gomoku-emacs-won ()
   "For making font-lock use the winner's face for the line.")
 
-(defface gomoku-font-lock-O-face
+(defface gomoku-O
     '((((class color)) (:foreground "red" :weight bold)))
   "Face to use for Emacs' O."
   :group 'gomoku)
 
-(defface gomoku-font-lock-X-face
+(defface gomoku-X
     '((((class color)) (:foreground "green" :weight bold)))
   "Face to use for your X."
   :group 'gomoku)
 
 (defvar gomoku-font-lock-keywords
-  '(("O" . 'gomoku-font-lock-O-face)
-    ("X" . 'gomoku-font-lock-X-face)
-    ("[-|/\\]" 0 (if gomoku-emacs-won
-                    'gomoku-font-lock-O-face
-                  'gomoku-font-lock-X-face)))
+  '(("O" . 'gomoku-O)
+    ("X" . 'gomoku-X)
+    ("[-|/\\]" 0 (if gomoku-emacs-won 'gomoku-O 'gomoku-X)))
   "*Font lock rules for Gomoku.")
 
 (put 'gomoku-mode 'front-sticky
@@ -206,7 +205,7 @@ is non-nil."
   (make-local-variable 'font-lock-defaults)
   (setq font-lock-defaults '(gomoku-font-lock-keywords t))
   (toggle-read-only t)
-  (run-hooks 'gomoku-mode-hook))
+  (run-mode-hooks 'gomoku-mode-hook))
 \f
 ;;;
 ;;; THE BOARD.