aboutsummaryrefslogtreecommitdiff
path: root/org-d20.el
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2019-01-06 08:09:33 +0000
committerSean Whitton <spwhitton@spwhitton.name>2019-01-06 08:09:33 +0000
commit11a0c8854208c4ef4e42df2a0652b8c2911abdd4 (patch)
tree58894c9bf03f9805b562a18356dcbef43e15177a /org-d20.el
parent640aadc47f0d12d10ffb464eeda5169962c20184 (diff)
downloadorg-d20-11a0c8854208c4ef4e42df2a0652b8c2911abdd4.tar.gz
Autoload some more functions users might want to bind
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Diffstat (limited to 'org-d20.el')
-rw-r--r--org-d20.el5
1 files changed, 5 insertions, 0 deletions
diff --git a/org-d20.el b/org-d20.el
index 8f4d35c..f10409e 100644
--- a/org-d20.el
+++ b/org-d20.el
@@ -143,17 +143,20 @@ the best N of them, e.g., 4d6k3."
(setq total (+ total (* sign new-roll))))
(cons rolls total))))
+;;;###autoload
(defun org-d20-d% ()
"Roll a percentile dice."
(interactive)
(org-d20-roll "1d100"))
+;;;###autoload
(defun org-d20-roll-at-point ()
"Roll the dice expression at point and display result in minibuffer."
(interactive)
(let ((exp (thing-at-point 'sexp t)))
(org-d20-roll exp)))
+;;;###autoload
(defun org-d20-roll (exp)
"Prompt, evaluate and display dice roll expression EXP.
@@ -179,6 +182,7 @@ the best N of them, e.g., 4d6k3."
(when org-d20-dice-sound
(play-sound-file org-d20-dice-sound)))
+;;;###autoload
(defun org-d20-roll-last ()
"Roll the last user dice roll expression again."
(interactive)
@@ -186,6 +190,7 @@ the best N of them, e.g., 4d6k3."
(org-d20-roll org-d20-roll--last)
(call-interactively #'org-d20-roll)))
+;;;###autoload
(defun org-d20-d20 ()
"Roll two d20, showing result with advantage and disadvantage, and neither."
(interactive)