瀏覽代碼

org-mode: Fix cache loading order

Ihor Radchenko 3 年之前
父節點
當前提交
7014675226
共有 1 個文件被更改,包括 1 次插入6 次删除
  1. 1 6
      lisp/org.el

+ 1 - 6
lisp/org.el

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