Make two well known amusements work on Android

* lisp/play/doctor.el (text-conversion-style):
(doctor-mode):
* lisp/play/dunnet.el (text-conversion-style):
(dun-mode): Set `text-conversion-style' to `action'.
This commit is contained in:
Po Lu 2023-04-26 09:55:32 +08:00
parent 5f389f4b63
commit a5e90e4eea
2 changed files with 10 additions and 0 deletions

View file

@ -129,6 +129,9 @@
"C-j" #'doctor-read-print
"RET" #'doctor-ret-or-read)
;; Actually defined in textconv.c.
(defvar text-conversion-style)
(define-derived-mode doctor-mode text-mode "Doctor"
"Major mode for running the Doctor (Eliza) program.
Like Text mode with Auto Fill mode
@ -137,6 +140,8 @@ reads the sentence before point, and prints the Doctor's answer."
:interactive nil
(doctor-make-variables)
(turn-on-auto-fill)
;; Make sure RET is processed by Emacs.
(setq text-conversion-style 'action)
(doctor-type '(i am the psychotherapist \.
(doc$ doctor--please) (doc$ doctor--describe) your (doc$ doctor--problems) \.
each time you are finished talking\, type \R\E\T twice \.))

View file

@ -1132,9 +1132,14 @@ treasures for points?" "4" "four")
;;;; Mode definitions for interactive mode
;; Actually defined in textconv.c.
(defvar text-conversion-style)
(define-derived-mode dun-mode text-mode "Dungeon"
"Major mode for running dunnet."
:interactive nil
;; Make sure RET is processed by Emacs.
(setq text-conversion-style 'action)
(setq-local scroll-step 2))
(defun dun-parse (_arg)