From: Po Lu Date: Wed, 26 Apr 2023 01:55:32 +0000 (+0800) Subject: Make two well known amusements work on Android X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a5e90e4eea2503b356589a66ec82a0fad6931439;p=emacs.git 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'. --- diff --git a/lisp/play/doctor.el b/lisp/play/doctor.el index dcf36c5c330..891274448d3 100644 --- a/lisp/play/doctor.el +++ b/lisp/play/doctor.el @@ -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 \.)) diff --git a/lisp/play/dunnet.el b/lisp/play/dunnet.el index 837508779e7..e290a9d73ec 100644 --- a/lisp/play/dunnet.el +++ b/lisp/play/dunnet.el @@ -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)