;;; blackbox.el --- blackbox game in Emacs Lisp
-;; Copyright (C) 1985-1987, 1992, 2001-2012 Free Software Foundation, Inc.
+;; Copyright (C) 1985-1987, 1992, 2001-2016 Free Software Foundation,
+;; Inc.
;; Author: F. Thomas May <uw-nsr!uw-warp!tom@beaver.cs.washington.edu>
;; Adapted-By: ESR
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'.
\\[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)