[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/adoc-mode d4df8e1de6 8/8: Only remove kw-replacement overl
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/adoc-mode d4df8e1de6 8/8: Only remove kw-replacement overlays in adoc-unfontify-region-function (#46) |
Date: |
Thu, 1 Feb 2024 16:01:27 -0500 (EST) |
branch: elpa/adoc-mode
commit d4df8e1de68699fa9bc45bd4486b49f8b53985f6
Author: TobiasZawada <i@tn-home.de>
Commit: GitHub <noreply@github.com>
Only remove kw-replacement overlays in adoc-unfontify-region-function (#46)
* Only remove kw-replacement overlays in adoc-unfontify-region-function
---
adoc-mode.el | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/adoc-mode.el b/adoc-mode.el
index 312dff736f..9e3b5c88d0 100644
--- a/adoc-mode.el
+++ b/adoc-mode.el
@@ -1918,6 +1918,7 @@ meta characters."
(make-overlay (match-end 1) (match-end 1)))))
(setq adoc-replacement-failed (not o))
(unless adoc-replacement-failed
+ (overlay-put o 'adoc-kw-replacement t)
(overlay-put o 'after-string s))))
found))
@@ -2156,11 +2157,9 @@ Use this function as matching function MATCHER in
`font-lock-keywords'."
(defun adoc-unfontify-region-function (beg end)
(font-lock-default-unfontify-region beg end)
- ;; remove overlays. Currently only used by AsciiDoc replacements
- ;; TODO: this is an extremely brute force solution and interacts very badly
- ;; with many (minor) modes using overlays such as flyspell or ediff
- (when adoc-insert-replacement
- (remove-overlays beg end))
+ (cl-loop for ol being the overlays from beg to end
+ when (overlay-get ol 'adoc-kw-replacement)
+ do (delete-overlay ol))
;; text properties. Currently only display raise used for sub/superscripts.
;; code snipped copied from tex-mode
- [nongnu] elpa/adoc-mode updated (05914c7319 -> d4df8e1de6), ELPA Syncer, 2024/02/01
- [nongnu] elpa/adoc-mode 47e27bf1af 2/8: Try to calm down byte-compiler in Emacs 28.1 AND Emacs 29.1, ELPA Syncer, 2024/02/01
- [nongnu] elpa/adoc-mode 7a28db1892 1/8: #44 Separate one-line header from next text block by paragraph-separate, ELPA Syncer, 2024/02/01
- [nongnu] elpa/adoc-mode 55ff225f46 3/8: Silence the byte compiler in Emacs 29.1 AND Emacs 30.1, ELPA Syncer, 2024/02/01
- [nongnu] elpa/adoc-mode 52147105d5 4/8: #44 Avoid cl-loop in native fontification of source blocks, ELPA Syncer, 2024/02/01
- [nongnu] elpa/adoc-mode 0a189c5f28 7/8: Revert "#44 Avoid cl-loop in native fontification of source blocks", ELPA Syncer, 2024/02/01
- [nongnu] elpa/adoc-mode d4df8e1de6 8/8: Only remove kw-replacement overlays in adoc-unfontify-region-function (#46),
ELPA Syncer <=
- [nongnu] elpa/adoc-mode 45af71bf17 5/8: #44 Just expansion of a doc string, ELPA Syncer, 2024/02/01
- [nongnu] elpa/adoc-mode cb7bb8f9d1 6/8: Revert "#44 Just expansion of a doc string", ELPA Syncer, 2024/02/01