[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
feature/android a5e90e4eea2: Make two well known amusements work on Andr
From: |
Po Lu |
Subject: |
feature/android a5e90e4eea2: Make two well known amusements work on Android |
Date: |
Tue, 25 Apr 2023 22:22:40 -0400 (EDT) |
branch: feature/android
commit a5e90e4eea2503b356589a66ec82a0fad6931439
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>
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)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- feature/android a5e90e4eea2: Make two well known amusements work on Android,
Po Lu <=