mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-07-16 15:16:26 +00:00
org-element: Fix wrong cache behaviour
* lisp/org-element.el (org-element--cache-before-change): Correctly preserve match data.
This commit is contained in:
parent
080f1dd5af
commit
a8568372ad
|
@ -5461,6 +5461,7 @@ BEG and END are the beginning and end of the range of changed
|
|||
text. See `before-change-functions' for more information."
|
||||
(let ((inhibit-quit t))
|
||||
;; Make sure buffer positions in cache are correct until END.
|
||||
(save-match-data
|
||||
(org-element--cache-sync (current-buffer) end)
|
||||
(org-with-wide-buffer
|
||||
(goto-char beg)
|
||||
|
@ -5477,7 +5478,6 @@ text. See `before-change-functions' for more information."
|
|||
"\\(" (org-with-limited-levels org-outline-regexp-bol) "\\)" "\\|"
|
||||
org-element--cache-closing-line "\\|"
|
||||
org-element--cache-opening-line)))
|
||||
(save-match-data
|
||||
(setq org-element--cache-change-warning
|
||||
(cond ((not (re-search-forward sensitive-re bottom t)) nil)
|
||||
((and (match-beginning 1)
|
||||
|
|
Loading…
Reference in a new issue