浏览代码

org-element-cache: Do not consider BEGIN lines of elements sensitive

* lisp/org-element.el (org-element--cache-sensitive-re): Remove
 #+begin_ and \begin{ lines from sensitive regexp.  Such changes can
 be handled without a need to re-parse from earlier position.  If a
 change introduces a new element, the new element will be recognised
 and the unupdated elements not intersecting with the new element will
 be handled during Phase 1.
Ihor Radchenko 3 年之前
父节点
当前提交
6339c622f8
共有 1 个文件被更改,包括 1 次插入2 次删除
  1. 1 2
      lisp/org-element.el

+ 1 - 2
lisp/org-element.el

@@ -6491,10 +6491,9 @@ If you observe Emacs hangs frequently, please report this to Org mode mailing li
    "^\\*+ " "\\|"
    "\\\\end{[A-Za-z0-9*]+}[ \t]*$" "\\|"
    "^[ \t]*\\(?:"
-   "#\\+\\(?:BEGIN[:_]\\|END\\(?:_\\|:?[ \t]*$\\)\\)" "\\|"
+   "#\\+END\\(?:_\\|:?[ \t]*$\\)" "\\|"
    org-list-full-item-re "\\|"
    ":\\(?: \\|$\\)" "\\|"
-   "\\\\begin{[A-Za-z0-9*]+}" "\\|"
    ":\\(?:\\w\\|[-_]\\)+:[ \t]*$"
    "\\)")
   "Regexp matching a sensitive line, structure wise.