summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <mail@nicolasgoaziou.fr>2019-03-22 18:32:40 +0100
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2019-03-22 18:32:40 +0100
commita39ee9887360a32494ea6405fa760ad3baf493b6 (patch)
treede46deca8b996679275229ac716ce088fd3113d4
parent273910d36cf0feab6081c7cebbada1e6df2f685f (diff)
downloadorg-mode-a39ee9887360a32494ea6405fa760ad3baf493b6.tar.gz
Turn `org-dynamic-block-alist' into a defvar
* lisp/org.el (org-dynamic-block-alist): Make it a defvar. Update docstring.
-rw-r--r--etc/ORG-NEWS5
-rw-r--r--lisp/org.el13
2 files changed, 7 insertions, 11 deletions
diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS
index 518a6fa..4d9530a 100644
--- a/etc/ORG-NEWS
+++ b/etc/ORG-NEWS
@@ -130,9 +130,8 @@ numbered list to a lettered list.
*** Add a dispatcher command to insert dynamic blocks
-You can add dynamic block into ~org-dynamic-block-alist~ with function
-~org-dynamic-block-define~. All dynamic blocks in
-~org-dynamic-block-define~ can be used by
+You can add new dynamic blocks with function
+~org-dynamic-block-define~. All such dynamic blocks can be used by
~org-dynamic-block-insert-dblock~ command.
*** Babel
diff --git a/lisp/org.el b/lisp/org.el
index db025a1..d8edaff 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -9575,16 +9575,13 @@ If COMMAND is not given, use `org-update-dblock'."
(unless (re-search-forward org-dblock-end-re nil t)
(error "Dynamic block not terminated"))))))
-(defcustom org-dynamic-block-alist nil
+(defvar org-dynamic-block-alist nil
"Alist defining all the Org dynamic blocks.
+
The key is the dynamic block type name, as a string. The value
-is the function used to insert the dynamic block."
- :group 'org-block
- :package-version '(Org . "9.3")
- :type '(alist :tag "Dynamic block name"
- :key-type string
- :value-type function)
- :safe #'listp)
+is the function used to insert the dynamic block.
+
+Use `org-dynamic-block-define' to populate it.")
(defun org-dynamic-block-function (type)
"Return function associated to a given dynamic block type.