about summary refs log tree commit diff
path: root/emacs.d/init-functions.el
diff options
context:
space:
mode:
authorVincent Ambo <vincent@spotify.com>2013-07-15T11·34+0200
committerVincent Ambo <vincent@spotify.com>2013-07-15T11·34+0200
commit9342b6e56f5a5481203a99d95ef442ae50f14f83 (patch)
tree03f41ba27866d979ac2a4ade4d37104555b85b0a /emacs.d/init-functions.el
parent23806edd3ef23f18d68923e13d5bc9d1a36b3ad4 (diff)
emacs: Added speak function
Diffstat (limited to 'emacs.d/init-functions.el')
-rw-r--r--emacs.d/init-functions.el4
1 files changed, 4 insertions, 0 deletions
diff --git a/emacs.d/init-functions.el b/emacs.d/init-functions.el
index c15b27248ebf..09ffe1777230 100644
--- a/emacs.d/init-functions.el
+++ b/emacs.d/init-functions.el
@@ -73,6 +73,10 @@
     (dotimes (_ (- 80 col (length prefix) (length postfix))) (insert "u"))
     (insert postfix)))
 
+(defun speak (m &optional voice)
+  (shell-command (if 'voice (concat "say " m)
+		   (concat "say -v " voice " " m))))
+
 ;; Reconnect rcirc
 (eval-after-load 'rcirc
   '(defun-rcirc-command reconnect (arg)