From a5e90e4eea2503b356589a66ec82a0fad6931439 Mon Sep 17 00:00:00 2001 From: Po Lu Date: Wed, 26 Apr 2023 09:55:32 +0800 Subject: [PATCH] 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'. --- lisp/play/doctor.el | 5 +++++ lisp/play/dunnet.el | 5 +++++ 2 files changed, 10 insertions(+) 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) -- 2.39.2