]> code.delx.au - gnu-emacs/blobdiff - lisp/play/mpuz.el
Update copyright year to 2015
[gnu-emacs] / lisp / play / mpuz.el
index e4e627a529300ab4d8ec34a1aa090887fef8d29e..9b90e2c0dac0771e30eddf8a722871899542c4b1 100644 (file)
@@ -1,6 +1,6 @@
 ;;; mpuz.el --- multiplication puzzle for GNU Emacs
 
 ;;; mpuz.el --- multiplication puzzle for GNU Emacs
 
-;; Copyright (C) 1990, 2001-2013 Free Software Foundation, Inc.
+;; Copyright (C) 1990, 2001-2015 Free Software Foundation, Inc.
 
 ;; Author: Philippe Schnoebelen <phs@lsv.ens-cachan.fr>
 ;; Overhauled: Daniel Pfeiffer <occitan@esperanto.org>
 
 ;; Author: Philippe Schnoebelen <phs@lsv.ens-cachan.fr>
 ;; Overhauled: Daniel Pfeiffer <occitan@esperanto.org>
@@ -94,7 +94,9 @@ The value t means never ding, and `error' means only ding on wrong input."
     map)
   "Local keymap to use in Mult Puzzle.")
 
     map)
   "Local keymap to use in Mult Puzzle.")
 
-(defun mpuz-mode ()
+
+
+(define-derived-mode mpuz-mode fundamental-mode "Mult Puzzle"
   "Multiplication puzzle mode.
 
 You have to guess which letters stand for which digits in the
   "Multiplication puzzle mode.
 
 You have to guess which letters stand for which digits in the
@@ -106,13 +108,7 @@ then the digit.  Thus, to guess that A=3, type `A 3'.
 To leave the game to do other editing work, just switch buffers.
 Then you may resume the game with M-x mpuz.
 You may abort a game by typing \\<mpuz-mode-map>\\[mpuz-offer-abort]."
 To leave the game to do other editing work, just switch buffers.
 Then you may resume the game with M-x mpuz.
 You may abort a game by typing \\<mpuz-mode-map>\\[mpuz-offer-abort]."
-  (interactive)
-  (kill-all-local-variables)
-  (setq major-mode 'mpuz-mode
-       mode-name  "Mult Puzzle"
-       tab-width 30)
-  (use-local-map mpuz-mode-map)
-  (run-mode-hooks 'mpuz-mode-hook))
+  (setq tab-width 30))
 
 \f
 ;; Some variables for statistics
 
 \f
 ;; Some variables for statistics