[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/idle-highlight-mode f9091c907d: Fix missing save-match-dat
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/idle-highlight-mode f9091c907d: Fix missing save-match-data |
Date: |
Sun, 19 Mar 2023 05:00:50 -0400 (EDT) |
branch: elpa/idle-highlight-mode
commit f9091c907d41e7b12d99d108a194229b8dbfc5ae
Author: Campbell Barton <ideasman42@gmail.com>
Commit: Campbell Barton <ideasman42@gmail.com>
Fix missing save-match-data
---
changelog.rst | 5 +++++
idle-highlight-mode.el | 25 +++++++++++++------------
2 files changed, 18 insertions(+), 12 deletions(-)
diff --git a/changelog.rst b/changelog.rst
index 7fc39ba3fa..c9ed0a4111 100644
--- a/changelog.rst
+++ b/changelog.rst
@@ -1,3 +1,8 @@
+
+- In development.
+
+ - Fix missing call to ``save-match-data``.
+
- Version 1.1.4 (2023-01-10)
- Rename ``global-idle-highlight-mode`` to ``idle-highlight-global-mode`` and
diff --git a/idle-highlight-mode.el b/idle-highlight-mode.el
index 4223f6007f..92ba7009ab 100755
--- a/idle-highlight-mode.el
+++ b/idle-highlight-mode.el
@@ -227,18 +227,19 @@ Where RANGES is an unordered list of (min . max) cons
cells."
Argument VISIBLE-RANGES is a list of (min . max) ranges to highlight."
(idle-highlight--unhighlight)
(save-excursion
- (let ((target-regexp (concat "\\_<" (regexp-quote target) "\\_>")))
- (pcase-dolist (`(,beg . ,end) visible-ranges)
- (goto-char beg)
- (while (re-search-forward target-regexp end t)
- (let ((match-beg (match-beginning 0))
- (match-end (match-end 0)))
- (unless (and idle-highlight-exclude-point
- (eq target-beg match-beg)
- (eq target-end match-end))
- (let ((ov (make-overlay match-beg match-end)))
- (overlay-put ov 'face 'idle-highlight)
- (push ov idle-highlight--overlays)))))))))
+ (save-match-data
+ (let ((target-regexp (concat "\\_<" (regexp-quote target) "\\_>")))
+ (pcase-dolist (`(,beg . ,end) visible-ranges)
+ (goto-char beg)
+ (while (re-search-forward target-regexp end t)
+ (let ((match-beg (match-beginning 0))
+ (match-end (match-end 0)))
+ (unless (and idle-highlight-exclude-point
+ (eq target-beg match-beg)
+ (eq target-end match-end))
+ (let ((ov (make-overlay match-beg match-end)))
+ (overlay-put ov 'face 'idle-highlight)
+ (push ov idle-highlight--overlays))))))))))
(defun idle-highlight--word-at-point-args ()
"Return arguments for `idle-highlight--highlight'."
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [nongnu] elpa/idle-highlight-mode f9091c907d: Fix missing save-match-data,
ELPA Syncer <=