emacs-nano-tts-minor-mode

A text-to-speech accessibility tool which reads aloud the active region.
git clone https://kaka.farm/~git/emacs-nano-tts-minor-mode
Log | Files | Refs | LICENSE

commit a4838075569f68aa8ce26f67702be0bd96cd8976
parent 52a3ffa5833bdda79eb36e5048fe97c1b59eb9f2
Author: Yuval Langer <yuval.langer@gmail.com>
Date:   Mon, 15 Jul 2024 08:19:11 +0300

Use pcase.

Diffstat:
Mnano-tts.el | 8+++-----
1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/nano-tts.el b/nano-tts.el @@ -77,16 +77,14 @@ about the last process." (if nano-tts--tts-process ;; If there is already a TTS process. (let ((tts-process-status (process-status nano-tts--tts-process))) - (cond + (pcase tts-process-status ;; And if the process is running. - ((equal tts-process-status - 'run) - + ('run ;; Send the existing process the text. (process-send-string nano-tts--tts-process (nano-tts--get-region-as-string-to-speak))) ;; If the TTS process is not running. - (t + (_ ;; Kill the TTS process before making nano-tts forget about ;; it. (nano-tts-kill))))