emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/play/gomoku.el


From: Richard M. Stallman
Subject: [Emacs-diffs] Changes to emacs/lisp/play/gomoku.el
Date: Wed, 21 Nov 2001 06:03:36 -0500

Index: emacs/lisp/play/gomoku.el
diff -u emacs/lisp/play/gomoku.el:1.32 emacs/lisp/play/gomoku.el:1.33
--- emacs/lisp/play/gomoku.el:1.32      Tue Nov 20 13:33:42 2001
+++ emacs/lisp/play/gomoku.el   Wed Nov 21 06:03:35 2001
@@ -192,7 +192,7 @@
 ;; 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 @@
 \\{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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]