summaryrefslogtreecommitdiff
path: root/.emacs.d/site-lisp
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2018-02-26 23:05:05 -0700
committerSean Whitton <spwhitton@spwhitton.name>2018-02-26 23:05:05 -0700
commit070ef5ad0fd34d3897afcd26448427fc267f65cb (patch)
treeea40a88d87cb182844d2d1b4a5ac2b5260427b3b /.emacs.d/site-lisp
parent801967697c87946a7e400d4ea58b16a2d52deff9 (diff)
downloaddotfiles-070ef5ad0fd34d3897afcd26448427fc267f65cb.tar.gz
spwd20 doesn't try to play a dice sound when no file configured
Diffstat (limited to '.emacs.d/site-lisp')
-rw-r--r--.emacs.d/site-lisp/spwd20.el6
1 files changed, 4 insertions, 2 deletions
diff --git a/.emacs.d/site-lisp/spwd20.el b/.emacs.d/site-lisp/spwd20.el
index 02e3360c..609a9645 100644
--- a/.emacs.d/site-lisp/spwd20.el
+++ b/.emacs.d/site-lisp/spwd20.el
@@ -219,7 +219,8 @@ the best N of them, e.g., 4d6k3."
(interactive "sRoll: ")
(setq spwd20-roll--last exp)
(message "%s = %s" exp (int-to-string (spwd20--roll exp)))
- (play-sound-file spwd20-dice-sound))
+ (when spwd20-dice-sound
+ (play-sound-file spwd20-dice-sound)))
(defun spwd20-roll-last ()
(interactive)
@@ -242,7 +243,8 @@ the best N of them, e.g., 4d6k3."
(concat fst* " " (propertize snd* 'face 'bold)))))
(message "No adv./disadv.: %s\tAdv.: %s\tDisadv.: %s"
fst* adv disadv))
- (play-sound-file spwd20-dice-sound))
+ (when spwd20-dice-sound
+ (play-sound-file spwd20-dice-sound)))
(defun spwd20-d% ()
"Roll a percentile dice."