From 11a0c8854208c4ef4e42df2a0652b8c2911abdd4 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Sun, 6 Jan 2019 08:09:33 +0000 Subject: Autoload some more functions users might want to bind Signed-off-by: Sean Whitton --- NEWS.md | 1 + org-d20.el | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/NEWS.md b/NEWS.md index d051870..f20c572 100644 --- a/NEWS.md +++ b/NEWS.md @@ -8,6 +8,7 @@ - You can now specify a dice expression for the number of a type of monster/NPC - Improve README for new users +- Autoload some more functions users might want to bind - Refactoring/cleanup 0.2 (2018-12-31) 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) -- cgit v1.2.3