]> code.delx.au - gnu-emacs/blobdiff - lisp/play/5x5.el
Leading "*" in the doc of defvars is long obsolete.
[gnu-emacs] / lisp / play / 5x5.el
index e6df0df828213a283474923c0c296b1b927912a6..c724a1bd7e2646e739399645c0838ce4ae035676 100644 (file)
@@ -1,6 +1,6 @@
-;;; 5x5.el --- simple little puzzle game -*- coding: utf-8 -*-
+;;; 5x5.el --- simple little puzzle game
 
-;; Copyright (C) 1999-201 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2016 Free Software Foundation, Inc.
 
 ;; Author: Dave Pearson <davep@davep.org>
 ;; Maintainer: Dave Pearson <davep@davep.org>
@@ -185,19 +185,8 @@ GRID is the grid of positions to click.")
 
 ;; Gameplay functions.
 
-(put '5x5-mode 'mode-class 'special)
-
-(defun 5x5-mode ()
-  "A mode for playing `5x5'.
-
-The key bindings for `5x5-mode' are:
-
-\\{5x5-mode-map}"
-  (kill-all-local-variables)
-  (use-local-map 5x5-mode-map)
-  (setq major-mode '5x5-mode
-        mode-name  "5x5")
-  (run-mode-hooks '5x5-mode-hook)
+(define-derived-mode 5x5-mode special-mode "5x5"
+  "A mode for playing `5x5'."
   (setq buffer-read-only t
         truncate-lines   t)
   (buffer-disable-undo))
@@ -953,8 +942,6 @@ lest."
       (y-or-n-p prompt)
     t))
 
-(random t)
-
 (provide '5x5)
 
 ;;; 5x5.el ends here