emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/greader cf96374 13/76: greader-espeak-executable custom


From: Stefan Monnier
Subject: [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.
Date: Fri, 8 Feb 2019 15:26:48 -0500 (EST)

branch: externals/greader
commit cf96374332826e19f45e874758e2bdbedc2c43c5
Author: Michelangelo Rodriguez <address@hidden>
Commit: Michelangelo Rodriguez <address@hidden>

    greader-espeak-executable custom variable added, along of 
greader-espeak--find-executable function that tries to determine if espeak 
executable is installed.
---
 greader-espeak.el | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/greader-espeak.el b/greader-espeak.el
index e9402fd..77c97c2 100644
--- a/greader-espeak.el
+++ b/greader-espeak.el
@@ -6,7 +6,7 @@ nil
   "back-end of espeak for greader."
   :group 'greader
   )
-
+;;; customization
 (defcustom
   greader-espeak-language
   "en"
@@ -21,6 +21,14 @@ espeak --list-languages
   "Specifies the rate os speech in words per minute."
   :tag "greader espeak rate"
   :type 'integer)
+(defcustom
+  greader-espeak-executable-name
+(greader-espeak--find-executable)
+"Path of espeak executable.
+this variable determines authomatically if espeak is present in your PATH 
environment, then if this variable is nil, it means that you must first install 
espeak."
+:tag "espeak executable"
+:type 'string)
+;;; code
 (defun greader-espeak-set-rate
     (&optional rate)
   "returns a string suitable for setting espeak rate."
@@ -34,3 +42,8 @@ espeak --list-languages
       
       (concat "-V " greader-espeak-language)
     (concat "-V " lang)))
+(defun greader-espeak--find-executable
+    ()
+  "tries to find espeak executable in PATH.
+If it's present, returns absolute path of espeak, else returns nil."
+(locate-file "espeak" exec-path))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]