[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/idle-highlight-mode 902df81b5a 18/59: Cleanup: deprecation
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/idle-highlight-mode 902df81b5a 18/59: Cleanup: deprecation warning using `in-string-p` |
Date: |
Thu, 7 Jul 2022 12:00:29 -0400 (EDT) |
branch: elpa/idle-highlight-mode
commit 902df81b5aa6cf28ed15f03ac3a8acb9359b826c
Author: Campbell Barton <ideasman42@gmail.com>
Commit: Campbell Barton <ideasman42@gmail.com>
Cleanup: deprecation warning using `in-string-p`
---
idle-highlight-mode.el | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/idle-highlight-mode.el b/idle-highlight-mode.el
index f4ec224da3..0f4dcd4d5e 100755
--- a/idle-highlight-mode.el
+++ b/idle-highlight-mode.el
@@ -77,6 +77,11 @@
(defvar idle-highlight--global-timer nil "Timer to trigger highlighting.")
+(defsubst idle-highlight--ignore-context ()
+ "Return non-nil when in a context that should be ignored."
+ ;; In a string.
+ (nth 3 (syntax-ppss)))
+
(defun idle-highlight--word-at-point ()
"Highlight the word under the point."
(if idle-highlight-mode
@@ -87,7 +92,7 @@
(idle-highlight--unhighlight)
(when
(and
- target-symbol (not (in-string-p))
+ target-symbol (not (idle-highlight--ignore-context))
(looking-at-p "\\s_\\|\\sw") ;; Symbol characters
(not (member target idle-highlight-exceptions)))
(setq idle-highlight--regexp (concat "\\<" (regexp-quote target)
"\\>"))
- [nongnu] branch elpa/idle-highlight-mode created (now 5418252a11), ELPA Syncer, 2022/07/07
- [nongnu] elpa/idle-highlight-mode 1e0b38c09f 02/59: [Refactor] Save the last highlighted regexp in a variable for easier unhighlighting., ELPA Syncer, 2022/07/07
- [nongnu] elpa/idle-highlight-mode 64d6522636 10/59: Fix documentation, ELPA Syncer, 2022/07/07
- [nongnu] elpa/idle-highlight-mode 902df81b5a 18/59: Cleanup: deprecation warning using `in-string-p`,
ELPA Syncer <=
- [nongnu] elpa/idle-highlight-mode c4be332ecb 34/59: readme: move hints into their own section, ELPA Syncer, 2022/07/07
- [nongnu] elpa/idle-highlight-mode aa4c7a7ada 40/59: readme: update description, ELPA Syncer, 2022/07/07
- [nongnu] elpa/idle-highlight-mode 4714dcafcc 36/59: readme: add default values for settings, ELPA Syncer, 2022/07/07
- [nongnu] elpa/idle-highlight-mode 2b627d5d45 24/59: Cleanup: be explicit that this mode isn't global, ELPA Syncer, 2022/07/07
- [nongnu] elpa/idle-highlight-mode 20a0fb798c 27/59: Disable the repeating idle timer when the minor mode isn't active, ELPA Syncer, 2022/07/07
- [nongnu] elpa/idle-highlight-mode 082ce4f5fc 48/59: Fix highlighting visible ranges, ELPA Syncer, 2022/07/07
- [nongnu] elpa/idle-highlight-mode 0423fc2b38 55/59: Fix #2 Substrings of identifiers are highlighted, ELPA Syncer, 2022/07/07
- [nongnu] elpa/idle-highlight-mode 7401286a4b 01/59: Version 1.0. Initial Commit., ELPA Syncer, 2022/07/07
- [nongnu] elpa/idle-highlight-mode df7f6a84f5 07/59: Highlight only when point is on a symbol character., ELPA Syncer, 2022/07/07
- [nongnu] elpa/idle-highlight-mode 834d03af77 08/59: Update version to 1.1.2, ELPA Syncer, 2022/07/07