Browse Source

org.el: Autoload org-load-modules-maybe

* lisp/org.el (org-load-modules-maybe): Autoload.

org-store-link and orgtbl-mode both 1) call org-load-modules-maybe at
the start of their execution, 2) can be used outside of Org mode, and
3) are in libraries that do not load org.el (instead org.el loads
them).  Autoload org-load-modules-maybe to avoid an error if these are
called before org.el is loaded.

Reported-by: Tim Frana <tfr@mailbox.org>
Ref: https://orgmode.org/list/5e0f0216-44d8-c909-3757-4d95650445ef@mailbox.org
Kyle Meyer 5 năm trước cách đây
mục cha
commit
edfafa9090
1 tập tin đã thay đổi với 1 bổ sung0 xóa
  1. 1 0
      lisp/org.el

+ 1 - 0
lisp/org.el

@@ -662,6 +662,7 @@ defined in org-duration.el.")
 (defvar org-modules-loaded nil
   "Have the modules been loaded already?")
 
+;;;###autoload
 (defun org-load-modules-maybe (&optional force)
   "Load all extensions listed in `org-modules'."
   (when (or force (not org-modules-loaded))