org-mode: Fix cache loading order

This commit is contained in:
Ihor Radchenko 2022-01-29 17:11:07 +08:00
parent 19a383d9f4
commit 7014675226
No known key found for this signature in database
GPG Key ID: 6470762A7DA11D8B
1 changed files with 1 additions and 6 deletions

View File

@ -4882,7 +4882,7 @@ The following commands are available:
(org-element-cache-reset) (org-element-cache-reset)
(when (and org-element-cache-persistent (when (and org-element-cache-persistent
org-element-use-cache) org-element-use-cache)
(org-persist-read 'org-element--cache (current-buffer))) (org-persist-load 'org-element--cache (current-buffer) t))
;; Initialize macros templates. ;; Initialize macros templates.
(org-macro-initialize-templates) (org-macro-initialize-templates)
;; Initialize radio targets. ;; Initialize radio targets.
@ -4894,11 +4894,6 @@ The following commands are available:
(org-setup-filling) (org-setup-filling)
;; Comments. ;; Comments.
(org-setup-comments-handling) (org-setup-comments-handling)
;; Initialize cache.
(org-element-cache-reset)
(when (and org-element-cache-persistent
org-element-use-cache)
(org-persist-load 'org-element--cache (current-buffer) t))
;; Beginning/end of defun ;; Beginning/end of defun
(setq-local beginning-of-defun-function 'org-backward-element) (setq-local beginning-of-defun-function 'org-backward-element)
(setq-local end-of-defun-function (setq-local end-of-defun-function