[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/greader a2c9a16 55/76: changed greader-set-rate to refl
From: |
Stefan Monnier |
Subject: |
[elpa] externals/greader a2c9a16 55/76: changed greader-set-rate to reflect new back-ends architecture. |
Date: |
Fri, 8 Feb 2019 15:26:58 -0500 (EST) |
branch: externals/greader
commit a2c9a169899355db8eec5ca0a4f4d82782551dca
Author: Michelangelo Rodriguez <address@hidden>
Commit: Michelangelo Rodriguez <address@hidden>
changed greader-set-rate to reflect new back-ends architecture.
---
greader-espeak.el | 14 ++++++++++----
greader-speechd.el | 13 +++++++++----
greader.el | 4 ++--
3 files changed, 21 insertions(+), 10 deletions(-)
diff --git a/greader-espeak.el b/greader-espeak.el
index 8c2c251..604dbd5 100644
--- a/greader-espeak.el
+++ b/greader-espeak.el
@@ -46,7 +46,9 @@ this variable determines authomatically if espeak is present
in your PATH enviro
"returns a string suitable for setting espeak rate."
(if (not rate)
(concat "-s" (number-to-string greader-espeak-rate))
- (concat "-s" (number-to-string rate))))
+ (progn
+ (setq-local greader-espeak-rate rate)
+ (concat "-s" (number-to-string rate)))))
(defun greader-espeak-set-language
(&optional lang)
"returns the appropriate string to pass to espeak in order to set the
language appropriately"
@@ -81,9 +83,13 @@ this function accepts only nil or t."
(greader-espeak-set-language)
(greader-espeak-set-language arg)))
('rate
- (if (not arg)
- (greader-espeak-set-rate)
- (greader-espeak-set-rate arg)))
+ (cond
+ ((not arg)
+ (greader-espeak-set-rate))
+ ((numberp arg)
+ (greader-espeak-set-rate arg))
+ ((equal arg 'value)
+ greader-espeak-rate)))
('punctuation
(cond
diff --git a/greader-speechd.el b/greader-speechd.el
index 04f7988..17609a5 100644
--- a/greader-speechd.el
+++ b/greader-speechd.el
@@ -62,7 +62,9 @@ if lang is omitted, it looks in variable
greader-speechd-language and retrieves
for further documentation, see the documentation for greader-speechd-rate
variable."
(if (not rate)
(concat "-r " (number-to-string greader-speechd-rate))
- (concat "-r " (number-to-string rate))))
+ (progn
+ (setq-local greader-speechd-rate rate)
+ (concat "-r " (number-to-string rate)))))
(defun greader-speechd-set-punctuation (&optional punct)
"returns a suitable parameter to pass to spd-say for setting punctuation
leve.
punct must be a numeric value, 0 for no punctuation, 1 for some and 2 or >2
for all punctuation."
@@ -103,9 +105,12 @@ punct must be a numeric value, 0 for no punctuation, 1 for
some and 2 or >2 for
(greader-speechd-set-language)
(greader-speechd-set-language arg)))
('rate
- (if (not arg)
- (greader-speechd-set-rate)
- (greader-speechd-set-rate arg)))
+ (cond((not arg)
+ (greader-speechd-set-rate))
+ ((numberp arg)
+ (greader-speechd-set-rate arg))
+ ((equal arg 'value)
+ greader-speechd-rate)))
('punctuation
(cond
((equal arg 'no)
diff --git a/greader.el b/greader.el
index dda5414..1d1f9ec 100644
--- a/greader.el
+++ b/greader.el
@@ -710,7 +710,7 @@ If prefix, it will be used to increment by that."
(if (not n)
(setq n 10))
(greader-stop)
- (greader-set-rate (+ greader-rate n))
+ (greader-set-rate (+ (greader-call-backend 'rate 'value) n))
(greader-read))
(defun greader-dec-rate (&optional n)
@@ -720,7 +720,7 @@ If prefix, it will be used to decrement rate."
(if (not n)
(setq n 10))
(greader-stop)
- (greader-set-rate (- greader-rate n))
+ (greader-set-rate (- (greader-call-backend 'rate 'value) n))
(greader-read))
(defun greader-sentence-needs-dehyphenation (str)
- [elpa] externals/greader 4482ba6 56/76: initial work on punctuation., (continued)
- [elpa] externals/greader 4482ba6 56/76: initial work on punctuation., Stefan Monnier, 2019/02/08
- [elpa] externals/greader 3186627 75/76: greader.el:, Stefan Monnier, 2019/02/08
- [elpa] externals/greader 4ef8c7d 57/76: work on punctuation completed., Stefan Monnier, 2019/02/08
- [elpa] externals/greader 7a414f2 73/76: more work on backend completion, Stefan Monnier, 2019/02/08
- [elpa] externals/greader 9274673 66/76: Some diffs applied to various files., Stefan Monnier, 2019/02/08
- [elpa] externals/greader aeb49fe 58/76: greader-speechd.el:, Stefan Monnier, 2019/02/08
- [elpa] externals/greader 2d55a6f 63/76: greader.el:, Stefan Monnier, 2019/02/08
- [elpa] externals/greader c5bb54e 61/76: greader.el:, Stefan Monnier, 2019/02/08
- [elpa] externals/greader 70128f8 59/76: greader.el:, Stefan Monnier, 2019/02/08
- [elpa] externals/greader 38b08ee 65/76: Merge branch 'devel', Stefan Monnier, 2019/02/08
- [elpa] externals/greader a2c9a16 55/76: changed greader-set-rate to reflect new back-ends architecture.,
Stefan Monnier <=
- [elpa] externals/greader 6baaffe 64/76: greader.el:, Stefan Monnier, 2019/02/08
- [elpa] externals/greader f278f60 70/76: fixes, Stefan Monnier, 2019/02/08
- [elpa] externals/greader 7d439f1 62/76: Patch from address@hidden applied, thanks!, Stefan Monnier, 2019/02/08
- [elpa] externals/greader 149ae41 74/76: Merge branch 'devel', Stefan Monnier, 2019/02/08
- [elpa] externals/greader 40e0718 69/76: greader.el:, Stefan Monnier, 2019/02/08
- [elpa] externals/greader 3af7992 49/76: Merge branch 'devel', Stefan Monnier, 2019/02/08
- [elpa] externals/greader 9dfba5b 72/76: Merge branch 'devel', Stefan Monnier, 2019/02/08
- [elpa] externals/greader 6141ff8 67/76: .gitignore, Stefan Monnier, 2019/02/08
- [elpa] externals/greader 79f5df8 46/76: greader.el:, Stefan Monnier, 2019/02/08
- [elpa] externals/greader 64893fa 60/76: README:, Stefan Monnier, 2019/02/08