Commit 2aa8e74a authored by Lute Kamstra's avatar Lute Kamstra
Browse files

(doctor-mode-map): Remove defvar.

(doctor-mode): Use define-derived-mode.
parent 09e99870
......@@ -30,6 +30,11 @@
(dungeon-mode-map): Rename to dun-mode-map. Keep old name as an
obsolete alias.
* play/doctor.el (doctor-mode-map): Remove defvar.
(doctor-mode): Use define-derived-mode.
* play/blackbox.el (blackbox-mode): Use run-mode-hooks.
2005-06-10 Miles Bader <>
* textmodes/flyspell.el (flyspell-incorrect, flyspell-duplicate):
......@@ -59,30 +59,21 @@
(set what ww)
(defvar doctor-mode-map nil)
(if doctor-mode-map
(setq doctor-mode-map (make-sparse-keymap))
(define-key doctor-mode-map "\n" 'doctor-read-print)
(define-key doctor-mode-map "\r" 'doctor-ret-or-read))
(defun doctor-mode ()
(define-derived-mode doctor-mode text-mode "Doctor"
"Major mode for running the Doctor (Eliza) program.
Like Text mode with Auto Fill mode
except that RET when point is after a newline, or LFD at any time,
reads the sentence before point, and prints the Doctor's answer."
(use-local-map doctor-mode-map)
(setq major-mode 'doctor-mode)
(setq mode-name "Doctor")
(doctor-type '(i am the psychotherapist \.
(doc$ please) (doc$ describe) your (doc$ problems) \.
each time you are finished talking, type \R\E\T twice \.))
(insert "\n"))
(define-key doctor-mode-map "\n" 'doctor-read-print)
(define-key doctor-mode-map "\r" 'doctor-ret-or-read)
(defun make-doctor-variables ()
(make-local-variable 'typos)
(setq typos
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment