Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace lax-plist-get with plist-get #5

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions read-aloud.el
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,11 @@ But he's just as dead as if he were wrong."))
)))

(defun read-aloud--cmd ()
(or (plist-get (lax-plist-get read-aloud-engines read-aloud-engine) 'cmd)
(or (plist-get (plist-get read-aloud-engines read-aloud-engine 'equal) 'cmd)
(user-error "Failed to get the default TTS engine")) )

(defun read-aloud--args ()
(plist-get (lax-plist-get read-aloud-engines read-aloud-engine) 'args))
(plist-get (plist-get read-aloud-engines read-aloud-engine 'equal) 'args))

(defun read-aloud--valid-str-p (str)
(and str (not (equal "" (string-trim str)))))
Expand Down Expand Up @@ -173,7 +173,7 @@ arbitual string like 'buffer', 'word' or 'selection'."
(kill-process read-aloud--c-pr)

;; if a tts engine has a separate step to switch itself off, use it
(let ((c (plist-get (lax-plist-get read-aloud-engines read-aloud-engine) 'kill)))
(let ((c (plist-get (plist-get read-aloud-engines read-aloud-engine 'equal) 'kill)))
(when c
(start-process-shell-command "read-aloud-kill" read-aloud--logbufname c)))

Expand Down