Add support for functions in the tables
This is still programmatic, as opposed to dynamically loading source code.
This commit is contained in:
parent
e570e9ccd0
commit
8b89bf665b
1 changed files with 1 additions and 0 deletions
|
|
@ -104,6 +104,7 @@ dice table (see `rpgdm-tables--choose-dice-table')."
|
||||||
(setq table (rpgdm-tables-load-file table table-name)))
|
(setq table (rpgdm-tables-load-file table table-name)))
|
||||||
(let* ((result (cond ((dice-table-p table) (rpgdm-tables--choose-dice-table table))
|
(let* ((result (cond ((dice-table-p table) (rpgdm-tables--choose-dice-table table))
|
||||||
((hash-table-p table) (rpgdm-tables--choose-freq-table table))
|
((hash-table-p table) (rpgdm-tables--choose-freq-table table))
|
||||||
|
((functionp table) (call-interactively table))
|
||||||
((listp table) (rpgdm-tables--choose-list table))
|
((listp table) (rpgdm-tables--choose-list table))
|
||||||
(t "Error: Could choose anything from %s (internal bug?)" table-name)))
|
(t "Error: Could choose anything from %s (internal bug?)" table-name)))
|
||||||
;; Replace any dice expression in the message with an roll:
|
;; Replace any dice expression in the message with an roll:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue