[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/play/doctor.el
From: |
Lute Kamstra |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/play/doctor.el |
Date: |
Fri, 10 Jun 2005 08:03:48 -0400 |
Index: emacs/lisp/play/doctor.el
diff -c emacs/lisp/play/doctor.el:1.34 emacs/lisp/play/doctor.el:1.35
*** emacs/lisp/play/doctor.el:1.34 Thu May 12 00:45:41 2005
--- emacs/lisp/play/doctor.el Fri Jun 10 12:03:48 2005
***************
*** 59,88 ****
(set what ww)
first))
! (defvar doctor-mode-map nil)
! (if doctor-mode-map
! nil
! (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 ()
"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."
- (interactive)
- (text-mode)
(make-doctor-variables)
- (use-local-map doctor-mode-map)
- (setq major-mode 'doctor-mode)
- (setq mode-name "Doctor")
(turn-on-auto-fill)
(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"))
(defun make-doctor-variables ()
(make-local-variable 'typos)
(setq typos
--- 59,79 ----
(set what ww)
first))
! (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."
(make-doctor-variables)
(turn-on-auto-fill)
(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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/lisp/play/doctor.el,
Lute Kamstra <=