Browse Source

Turn `org-dynamic-block-alist' into a defvar

* lisp/org.el (org-dynamic-block-alist): Make it a defvar.  Update docstring.
Nicolas Goaziou 6 years ago
parent
commit
a39ee98873
2 changed files with 7 additions and 11 deletions
  1. 2 3
      etc/ORG-NEWS
  2. 5 8
      lisp/org.el

+ 2 - 3
etc/ORG-NEWS

@@ -130,9 +130,8 @@ numbered list to a lettered list.
 
 
 *** Add a dispatcher command to insert dynamic blocks
 *** 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.
 ~org-dynamic-block-insert-dblock~ command.
 
 
 *** Babel
 *** Babel

+ 5 - 8
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)
 	(unless (re-search-forward org-dblock-end-re nil t)
 	  (error "Dynamic block not terminated"))))))
 	  (error "Dynamic block not terminated"))))))
 
 
-(defcustom org-dynamic-block-alist nil
+(defvar org-dynamic-block-alist nil
   "Alist defining all the Org dynamic blocks.
   "Alist defining all the Org dynamic blocks.
+
 The key is the dynamic block type name, as a string.  The value
 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)
 (defun org-dynamic-block-function (type)
   "Return function associated to a given dynamic block type.
   "Return function associated to a given dynamic block type.