[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/greader 5456dc6 26/76: greader-speechd.el:
From: |
Stefan Monnier |
Subject: |
[elpa] externals/greader 5456dc6 26/76: greader-speechd.el: |
Date: |
Fri, 8 Feb 2019 15:26:50 -0500 (EST) |
branch: externals/greader
commit 5456dc65820e9d88bd1e182d68ef13fac1529ad6
Author: Michelangelo Rodriguez <address@hidden>
Commit: Michelangelo Rodriguez <address@hidden>
greader-speechd.el:
function greader-speechd-set-punctuation added.
---
greader-speechd.el | 25 +++++++++++++++++++++----
1 file changed, 21 insertions(+), 4 deletions(-)
diff --git a/greader-speechd.el b/greader-speechd.el
index 3d3310a..320b23f 100644
--- a/greader-speechd.el
+++ b/greader-speechd.el
@@ -35,11 +35,12 @@
:type 'integer)
(defcustom
greader-speechd-punctuation
- 0
- "punctuation level for speech-dispatcher client.
-(0 = none, 1 = some, 2 or > 2 all)"
+ "none"
+"punctuation level of speech-dispatcher client to speak.
+It must be one of the following:
+none, some, or all."
:tag "speech-dispatcher punctuation level"
- :type 'integer)
+ :type 'string)
;;; code
(defun greader-speechd--find-executable ()
"tries to find speech-dispatcher client using greader-speechd-executable as
basename."
@@ -60,3 +61,19 @@ for further documentation, see the documentation for
greader-speechd-rate variab
(if (not rate)
(concat "-r " (number-to-string greader-speechd-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."
+(catch 'return
+ (cond
+ ((booleanp punct)
+ (if punct
+ (throw 'return (concat "-p all"))
+ (throw 'return (concat "-p none"))))
+ ((numberp punct)
+ (if (= punct 0)
+ (throw 'return (concat "-p none")))
+ (if (= punct 1)
+ (throw 'return (concat "-p some")))
+ (if (>= punct 2)
+ (throw 'return (concat "-p all")))))))
- [elpa] externals/greader cf96374 13/76: greader-espeak-executable custom variable added, along of greader-espeak--find-executable function that tries to determine if espeak executable is installed., (continued)
- [elpa] externals/greader cf96374 13/76: greader-espeak-executable custom variable added, along of greader-espeak--find-executable function that tries to determine if espeak executable is installed., Stefan Monnier, 2019/02/08
- [elpa] externals/greader b920c94 17/76: greader-espeak.el:, Stefan Monnier, 2019/02/08
- [elpa] externals/greader 4f0dd2a 15/76: greader-espeak.el:, Stefan Monnier, 2019/02/08
- [elpa] externals/greader 804d9a7 10/76: lexical binding enabled, Stefan Monnier, 2019/02/08
- [elpa] externals/greader d7d1510 12/76: function greader-espeak-set-language added., Stefan Monnier, 2019/02/08
- [elpa] externals/greader 076f8b7 19/76: greader-speechd.el:, Stefan Monnier, 2019/02/08
- [elpa] externals/greader 54f52c8 20/76: greader-espeak.el:, Stefan Monnier, 2019/02/08
- [elpa] externals/greader 3669ca8 24/76: function greader-speechd-set-language added., Stefan Monnier, 2019/02/08
- [elpa] externals/greader 9fbe0e9 22/76: greader-speechd.el:, Stefan Monnier, 2019/02/08
- [elpa] externals/greader 55cc804 27/76: greader-speechd.el:, Stefan Monnier, 2019/02/08
- [elpa] externals/greader 5456dc6 26/76: greader-speechd.el:,
Stefan Monnier <=
- [elpa] externals/greader 489d211 28/76: greader-speechd.el:, Stefan Monnier, 2019/02/08
- [elpa] externals/greader 0c0c400 16/76: greader-espeak.el:, Stefan Monnier, 2019/02/08
- [elpa] externals/greader 0fcb3a6 23/76: greader-speechd.el:, Stefan Monnier, 2019/02/08
- [elpa] externals/greader b984183 14/76: greader-espeak.el:, Stefan Monnier, 2019/02/08
- [elpa] externals/greader 2c81690 18/76: greader-speechd.el:, Stefan Monnier, 2019/02/08
- [elpa] externals/greader cf2681c 21/76: greader-speechd.el:, Stefan Monnier, 2019/02/08
- [elpa] externals/greader 08b0ebb 25/76: greader-speechd.el:, Stefan Monnier, 2019/02/08
- [elpa] externals/greader 4b5bfb6 33/76: greader.el:, Stefan Monnier, 2019/02/08
- [elpa] externals/greader cf490a5 31/76: function greader-speechd--find-executable not used for now, in any case we keep it in source for now., Stefan Monnier, 2019/02/08
- [elpa] externals/greader a79c95d 29/76: greader-speechd.el:, Stefan Monnier, 2019/02/08