/[emacs]/emacs/lisp/play/gomoku.el
ViewVC logotype

Diff of /emacs/lisp/play/gomoku.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.32 by eliz, Tue Nov 20 18:33:42 2001 UTC revision 1.33 by rms, Wed Nov 21 11:03:35 2001 UTC
# Line 192  One useful value to include is `turn-on- Line 192  One useful value to include is `turn-on-
192  ;; allow View Mode to be activated in its buffer.  ;; allow View Mode to be activated in its buffer.
193  (put 'gomoku-mode 'mode-class 'special)  (put 'gomoku-mode 'mode-class 'special)
194    
195  (define-derived-mode gomoku-mode nil "Gomoku"  (defun gomoku-mode ()
196    "Major mode for playing Gomoku against Emacs.    "Major mode for playing Gomoku against Emacs.
197  You and Emacs play in turn by marking a free square.  You mark it with X  You and Emacs play in turn by marking a free square.  You mark it with X
198  and Emacs marks it with O.  The winner is the first to get five contiguous  and Emacs marks it with O.  The winner is the first to get five contiguous
# Line 204  Other useful commands: Line 204  Other useful commands:
204  \\{gomoku-mode-map}  \\{gomoku-mode-map}
205  Entry to this mode calls the value of `gomoku-mode-hook' if that value  Entry to this mode calls the value of `gomoku-mode-hook' if that value
206  is non-nil.  One interesting value is `turn-on-font-lock'."  is non-nil.  One interesting value is `turn-on-font-lock'."
207      (interactive)
208      (setq major-mode 'gomoku-mode
209            mode-name "Gomoku")
210    (gomoku-display-statistics)    (gomoku-display-statistics)
211    (set (make-local-variable 'font-lock-defaults)    (use-local-map gomoku-mode-map)
212         '(gomoku-font-lock-keywords t))    (make-local-variable 'font-lock-defaults)
213    (toggle-read-only t))    (setq font-lock-defaults '(gomoku-font-lock-keywords t))
214      (toggle-read-only t)
215      (run-hooks 'gomoku-mode-hook))
216    
217  ;;;  ;;;
218  ;;; THE BOARD.  ;;; THE BOARD.

Legend:
Removed from v.1.32  
changed lines
  Added in v.1.33

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26