[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals-release/org 6a558fc 19/22: org: Fix potential modified
From: |
ELPA Syncer |
Subject: |
[elpa] externals-release/org 6a558fc 19/22: org: Fix potential modified src match-data issue |
Date: |
Mon, 27 Sep 2021 15:57:36 -0400 (EDT) |
branch: externals-release/org
commit 6a558fc17b42911b6d01e43fcd42754345970a60
Author: TEC <tec@tecosaur.com>
Commit: TEC <tec@tecosaur.com>
org: Fix potential modified src match-data issue
* lisp/org.el (org-fontify-meta-lines-and-blocks-1): When this is run on
a src block, a "leaky" major mode called in
`org-src-font-lock-fontify-block' can modify the match data.
This is problematic, as the match data already set is important for
font-lock. To protect ourselves from this behaviour, we can wrap
`org-src-font-lock-fontify-block' in `save-match-data' to ensure that
the match data for the src block is conserved.
---
lisp/org.el | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lisp/org.el b/lisp/org.el
index be7ddcd..ae0e84c 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -5289,7 +5289,8 @@ by a #."
(org-remove-flyspell-overlays-in nl-before-endline end-of-endline)
(cond
((and lang (not (string= lang "")) org-src-fontify-natively)
- (org-src-font-lock-fontify-block lang block-start block-end)
+ (save-match-data
+ (org-src-font-lock-fontify-block lang block-start block-end))
(add-text-properties bol-after-beginline block-end '(src-block
t)))
(quoting
(add-text-properties
- [elpa] externals-release/org 268a433 01/22: mk/server.mk: Use a new path, (continued)
- [elpa] externals-release/org 268a433 01/22: mk/server.mk: Use a new path, ELPA Syncer, 2021/09/27
- [elpa] externals-release/org bf22d98 10/22: CONTRIBUTE: Update to follow the new structure of doc/, ELPA Syncer, 2021/09/27
- [elpa] externals-release/org 413060b 05/22: CONTRIBUTE: Fix merge leftover, ELPA Syncer, 2021/09/27
- [elpa] externals-release/org 399481b 09/22: Do not ignore user-defined display-buffer-alist in org-insert-link, ELPA Syncer, 2021/09/27
- [elpa] externals-release/org 3f5605e 06/22: org-agenda.el: Avoid dependency on subr-x, ELPA Syncer, 2021/09/27
- [elpa] externals-release/org 05ee1e6 18/22: Do not rely on M-q binding for filling src-block, ELPA Syncer, 2021/09/27
- [elpa] externals-release/org ec7c16a 08/22: ox-latex: Allow percent sign in 'src-block' caption, ELPA Syncer, 2021/09/27
- [elpa] externals-release/org 6a2c487 07/22: Avoid infinite loop in org-agenda-dim-blocked-tasks, ELPA Syncer, 2021/09/27
- [elpa] externals-release/org 97de19f 12/22: Fix not updating org-clock-marker after refiling from indirect buffer, ELPA Syncer, 2021/09/27
- [elpa] externals-release/org d8b9bd0 11/22: Fix byte-comp function warnings, ELPA Syncer, 2021/09/27
- [elpa] externals-release/org 6a558fc 19/22: org: Fix potential modified src match-data issue,
ELPA Syncer <=
- [elpa] externals-release/org 14fb761 22/22: Do not use mark-whole-buffer noninteractively, ELPA Syncer, 2021/09/27
- [elpa] externals-release/org bea172a 02/22: mk/default.mk: Use the Emacs manual css, ELPA Syncer, 2021/09/27
- [elpa] externals-release/org a33ad98 04/22: CONTRIBUTE: Fix link for cloning as a contributor, ELPA Syncer, 2021/09/27
- [elpa] externals-release/org 4a11766 03/22: docs: Update outdated code.orgmode.org links, ELPA Syncer, 2021/09/27
- [elpa] externals-release/org e23815b 13/22: Correctly handle org-log-note-clock-out non-interactively, ELPA Syncer, 2021/09/27
- [elpa] externals-release/org aea7cab 14/22: Fix duplicate logbook entry for repeated tasks, ELPA Syncer, 2021/09/27
- [elpa] externals-release/org dbbb93d 15/22: lisp/org-table.el: Fix positioning of "#+TBLFM:, ELPA Syncer, 2021/09/27
- [elpa] externals-release/org f7d6db1 16/22: org-bibtex-read: Do not add nil when there is no entry at point, ELPA Syncer, 2021/09/27
- [elpa] externals-release/org 0b4e357 17/22: Avoid creating ID property during tangling, ELPA Syncer, 2021/09/27
- [elpa] externals-release/org 529a1bd 20/22: doc/org-manual.org: Reintroduce lost footnote definition., ELPA Syncer, 2021/09/27