X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/723088480da2c8320e0944bc23f9b72fccb54319..ce8171797dafbde765170b79e5f154afc4872e86:/lisp/play/blackbox.el diff --git a/lisp/play/blackbox.el b/lisp/play/blackbox.el index 4e8790c358..8e4106e03e 100644 --- a/lisp/play/blackbox.el +++ b/lisp/play/blackbox.el @@ -1,6 +1,7 @@ ;;; blackbox.el --- blackbox game in Emacs Lisp -;; Copyright (C) 1985-1987, 1992, 2001-2012 Free Software Foundation, Inc. +;; Copyright (C) 1985-1987, 1992, 2001-2014 Free Software Foundation, +;; Inc. ;; Author: F. Thomas May ;; Adapted-By: ESR @@ -112,9 +113,8 @@ map)) ;; Blackbox mode is suitable only for specially formatted data. -(put 'blackbox-mode 'mode-class 'special) -(defun blackbox-mode () +(define-derived-mode blackbox-mode special-mode "Blackbox" "Major mode for playing blackbox. To learn how to play blackbox, see the documentation for function `blackbox'. @@ -123,13 +123,7 @@ The usual mnemonic keys move the cursor around the box. \\[bb-romp] -- send in a ray from point, or toggle a ball at point \\[bb-done] -- end game and get score" - (interactive) - (kill-all-local-variables) - (use-local-map blackbox-mode-map) - (setq truncate-lines t) - (setq major-mode 'blackbox-mode) - (setq mode-name "Blackbox") - (run-mode-hooks 'blackbox-mode-hook)) + (setq truncate-lines t)) ;;;###autoload (defun blackbox (num) @@ -259,7 +253,6 @@ a reflection." (bb-goto (cons bb-x bb-y))) (defun bb-init-board (num-balls) - (random t) (let (board pos) (while (>= (setq num-balls (1- num-balls)) 0) (while