]> code.delx.au - gnu-emacs/blobdiff - lisp/play/blackbox.el
Merge from emacs-24; up to 2013-01-03T02:37:57Z!rgm@gnu.org
[gnu-emacs] / lisp / play / blackbox.el
index d38f799756bea843250930ee0c38b8aaa659b0a6..ce2c928db0dc00ec851067e19fc82fe4a2ab2932 100644 (file)
     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'.
 
@@ -124,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)