]> code.delx.au - gnu-emacs/blobdiff - lisp/play/5x5.el
Update copyright year to 2015
[gnu-emacs] / lisp / play / 5x5.el
index 2e3f500766f0cdfcba9a1781ea582b9a5c7d9074..0258f1e4e4a609e3d7046c5a73a29918277a9d11 100644 (file)
@@ -1,6 +1,6 @@
 ;;; 5x5.el --- simple little puzzle game -*- coding: utf-8 -*-
 
-;; Copyright (C) 1999-2013 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2015 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))