# HG changeset patch # User Richard M. Stallman # Date 717542828 0 # Node ID d0b19afef0aec9f7130ee1ac8e91c5693efafedd # Parent 6a8704922fe825d1db67590f1cbcd272e7e5e640 Fix setup of mpuz-read-map not to depend on keymap format. (mpuz): Renamed from mult-puzzle. Make it autoload. diff -r 6a8704922fe8 -r d0b19afef0ae lisp/play/mpuz.el --- a/lisp/play/mpuz.el Sat Sep 26 21:15:01 1992 +0000 +++ b/lisp/play/mpuz.el Sat Sep 26 21:27:08 1992 +0000 @@ -76,20 +76,23 @@ (if mpuz-read-map nil (setq mpuz-read-map (make-keymap)) - (fillarray mpuz-read-map 'exit-minibuffer)) + (let ((i 0)) + (while (< i (length mpuz-read-map)) + (define-key mpuz-read-map (char-to-string i) 'exit-minibuffer) + (setq i (1+ i))))) (defun mpuz-mode () - "Multiplication puzzle with GNU Emacs. + "Multiplication puzzle mode. You have to guess which letters stand for which digits in the -multiplication displayed inside the *Mult Puzzle* buffer. +multiplication displayed inside the `*Mult Puzzle*' buffer. -You may enter a proposal (e.g. A=3) by hitting first the letter A, -then the digit 3, on your keyboard. +You may enter a guess for a letter's value by typing first the letter, +then the digit. Thus, to guess that A=3, type A 3. -At any time you may leave the game to do other editing work. :-) -Then you may resume the game with M-x mult-puzzle. -You may abort a game by hitting \\[keyboard-quit]." +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-offer-abort]." (interactive) (setq major-mode 'mpuz-mode mode-name "Mult Puzzle") @@ -336,7 +339,8 @@ (mpuz-start-new-game) (message "OK. I won't."))) -(defun mult-puzzle () +;;;###autoload +(defun mpuz () "Multiplication puzzle with GNU Emacs." ;; Main entry point (interactive)