summaryrefslogtreecommitdiff
path: root/lisp/play
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>2001-11-21 11:03:35 +0000
committerRichard M. Stallman <rms@gnu.org>2001-11-21 11:03:35 +0000
commit5ca809a7b69932b749919b801db80432a8eee301 (patch)
tree94c4df50f21c7ecc00af56efc77acd3fe6014f9b /lisp/play
parent23d107d750ce2efe24658e9e96a98fecac9f7e66 (diff)
downloademacs-5ca809a7b69932b749919b801db80432a8eee301.tar.gz
(gomoku-mode): Don't use define-derived-mode.
Diffstat (limited to 'lisp/play')
-rw-r--r--lisp/play/gomoku.el13
1 files changed, 9 insertions, 4 deletions
diff --git a/lisp/play/gomoku.el b/lisp/play/gomoku.el
index d81b2e79c17..28c829d2ac4 100644
--- a/lisp/play/gomoku.el
+++ b/lisp/play/gomoku.el
@@ -192,7 +192,7 @@ One useful value to include is `turn-on-font-lock' to highlight the pieces."
;; allow View Mode to be activated in its buffer.
(put 'gomoku-mode 'mode-class 'special)
-(define-derived-mode gomoku-mode nil "Gomoku"
+(defun gomoku-mode ()
"Major mode for playing Gomoku against Emacs.
You and Emacs play in turn by marking a free square. You mark it with X
and Emacs marks it with O. The winner is the first to get five contiguous
@@ -204,10 +204,15 @@ Other useful commands:
\\{gomoku-mode-map}
Entry to this mode calls the value of `gomoku-mode-hook' if that value
is non-nil. One interesting value is `turn-on-font-lock'."
+ (interactive)
+ (setq major-mode 'gomoku-mode
+ mode-name "Gomoku")
(gomoku-display-statistics)
- (set (make-local-variable 'font-lock-defaults)
- '(gomoku-font-lock-keywords t))
- (toggle-read-only t))
+ (use-local-map gomoku-mode-map)
+ (make-local-variable 'font-lock-defaults)
+ (setq font-lock-defaults '(gomoku-font-lock-keywords t))
+ (toggle-read-only t)
+ (run-hooks 'gomoku-mode-hook))
;;;
;;; THE BOARD.