aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1992-09-26 21:27:08 +0000
committerRichard M. Stallman1992-09-26 21:27:08 +0000
commit58c43274c59ba819e40ddee2a82f27caea7a373c (patch)
tree29499b0bc0b14e232ca195072606d8417efb7bd5
parentb6a5978e16b1c844a1196922383ebc775fd0a164 (diff)
downloademacs-58c43274c59ba819e40ddee2a82f27caea7a373c.tar.gz
emacs-58c43274c59ba819e40ddee2a82f27caea7a373c.zip
Fix setup of mpuz-read-map not to depend on keymap format.
(mpuz): Renamed from mult-puzzle. Make it autoload.
-rw-r--r--lisp/play/mpuz.el22
1 files changed, 13 insertions, 9 deletions
diff --git a/lisp/play/mpuz.el b/lisp/play/mpuz.el
index 8909cf6ae02..28811924470 100644
--- a/lisp/play/mpuz.el
+++ b/lisp/play/mpuz.el
@@ -76,20 +76,23 @@
76 76
77(if mpuz-read-map nil 77(if mpuz-read-map nil
78 (setq mpuz-read-map (make-keymap)) 78 (setq mpuz-read-map (make-keymap))
79 (fillarray mpuz-read-map 'exit-minibuffer)) 79 (let ((i 0))
80 (while (< i (length mpuz-read-map))
81 (define-key mpuz-read-map (char-to-string i) 'exit-minibuffer)
82 (setq i (1+ i)))))
80 83
81(defun mpuz-mode () 84(defun mpuz-mode ()
82 "Multiplication puzzle with GNU Emacs. 85 "Multiplication puzzle mode.
83 86
84You have to guess which letters stand for which digits in the 87You have to guess which letters stand for which digits in the
85multiplication displayed inside the *Mult Puzzle* buffer. 88multiplication displayed inside the `*Mult Puzzle*' buffer.
86 89
87You may enter a proposal (e.g. A=3) by hitting first the letter A, 90You may enter a guess for a letter's value by typing first the letter,
88then the digit 3, on your keyboard. 91then the digit. Thus, to guess that A=3, type A 3.
89 92
90At any time you may leave the game to do other editing work. :-) 93To leave the game to do other editing work, just switch buffers.
91Then you may resume the game with M-x mult-puzzle. 94Then you may resume the game with M-x mpuz.
92You may abort a game by hitting \\[keyboard-quit]." 95You may abort a game by typing \\<mpuz-mode-map>\\[mpuz-offer-abort]."
93 (interactive) 96 (interactive)
94 (setq major-mode 'mpuz-mode 97 (setq major-mode 'mpuz-mode
95 mode-name "Mult Puzzle") 98 mode-name "Mult Puzzle")
@@ -336,7 +339,8 @@ You may abort a game by hitting \\[keyboard-quit]."
336 (mpuz-start-new-game) 339 (mpuz-start-new-game)
337 (message "OK. I won't."))) 340 (message "OK. I won't.")))
338 341
339(defun mult-puzzle () 342;;;###autoload
343(defun mpuz ()
340 "Multiplication puzzle with GNU Emacs." 344 "Multiplication puzzle with GNU Emacs."
341 ;; Main entry point 345 ;; Main entry point
342 (interactive) 346 (interactive)