[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/idle-highlight-mode f6ea983df9 06/59: Remove previous high
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/idle-highlight-mode f6ea983df9 06/59: Remove previous highlights if there's nothing to highlight at point. |
Date: |
Thu, 7 Jul 2022 12:00:28 -0400 (EDT) |
branch: elpa/idle-highlight-mode
commit f6ea983df969b018fda772ed4ed5fd69347ec81a
Author: Cornelius Mika <cornelius.mika@gmail.com>
Commit: Campbell Barton <ideasman42@gmail.com>
Remove previous highlights if there's nothing to highlight at point.
---
idle-highlight-mode.el | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/idle-highlight-mode.el b/idle-highlight-mode.el
index 04aa810093..f4e19baeb8 100755
--- a/idle-highlight-mode.el
+++ b/idle-highlight-mode.el
@@ -73,14 +73,17 @@
(
(target-symbol (symbol-at-point))
(target (symbol-name target-symbol)))
- (when
+ (if
(and
target-symbol (not (in-string-p))
;; TODO: no need to highlight keywords like if
(not (equal target "end")))
+ (progn
+ (idle-highlight-unhighlight)
+ (setq idle-highlight-regexp (concat "\\<" (regexp-quote target)
"\\>"))
+ (highlight-regexp idle-highlight-regexp 'idle-highlight))
(idle-highlight-unhighlight)
- (setq idle-highlight-regexp (concat "\\<" (regexp-quote target) "\\>"))
- (highlight-regexp idle-highlight-regexp 'idle-highlight)))))
+ (setq idle-highlight-regexp nil)))))
(defsubst idle-highlight-unhighlight ()
(if idle-highlight-regexp
- [nongnu] elpa/idle-highlight-mode 8be1b197d6 39/59: Add changelog, (continued)
- [nongnu] elpa/idle-highlight-mode 8be1b197d6 39/59: Add changelog, ELPA Syncer, 2022/07/07
- [nongnu] elpa/idle-highlight-mode 94790ca395 47/59: Cleanup: variable names, ELPA Syncer, 2022/07/07
- [nongnu] elpa/idle-highlight-mode bdc6cb06e0 37/59: Reduce the default idle time to 0.35 seconds, ELPA Syncer, 2022/07/07
- [nongnu] elpa/idle-highlight-mode f47a2cc796 50/59: Cleanup: replace 'if' with 'cond', ELPA Syncer, 2022/07/07
- [nongnu] elpa/idle-highlight-mode 7d6eba737d 52/59: Cleanup: remove redundant groups, ELPA Syncer, 2022/07/07
- [nongnu] elpa/idle-highlight-mode 05db87d2a5 32/59: Cleanup: replace defsubst with defun, ELPA Syncer, 2022/07/07
- [nongnu] elpa/idle-highlight-mode 21b63d0502 25/59: Cleanup: simplify coding hook example, ELPA Syncer, 2022/07/07
- [nongnu] elpa/idle-highlight-mode 4f41607fa1 31/59: Add idle-highlight-exceptions-face, ELPA Syncer, 2022/07/07
- [nongnu] elpa/idle-highlight-mode 0a24f8e402 58/59: Cleanup: use brief SPDX license, ELPA Syncer, 2022/07/07
- [nongnu] elpa/idle-highlight-mode 03b5de12a6 56/59: changelog: correct syntax, ELPA Syncer, 2022/07/07
- [nongnu] elpa/idle-highlight-mode f6ea983df9 06/59: Remove previous highlights if there's nothing to highlight at point.,
ELPA Syncer <=
- [nongnu] elpa/idle-highlight-mode 83df5da535 05/59: Header, footer, usage comments, ELPA Syncer, 2022/07/07
- [nongnu] elpa/idle-highlight-mode 8b6e0dffd1 03/59: Implement idle highlighting as a minor mode., ELPA Syncer, 2022/07/07
- [nongnu] elpa/idle-highlight-mode ee5381764c 51/59: Add docstrings, ELPA Syncer, 2022/07/07
- [nongnu] elpa/idle-highlight-mode 9cbb9f2fde 04/59: Rename file to idle-highlight-mode.el, ELPA Syncer, 2022/07/07
- [nongnu] elpa/idle-highlight-mode 1f3620ba70 14/59: Enable lexical binding., ELPA Syncer, 2022/07/07
- [nongnu] elpa/idle-highlight-mode f71e575540 13/59: Version 1.1.3, ELPA Syncer, 2022/07/07
- [nongnu] elpa/idle-highlight-mode 9435c1f3ca 41/59: readme: correct references to idle-time, ELPA Syncer, 2022/07/07
- [nongnu] elpa/idle-highlight-mode 768745ef1c 21/59: Cleanup: add code sections, ELPA Syncer, 2022/07/07
- [nongnu] elpa/idle-highlight-mode 0916be7075 53/59: Cleanup: docstrings, ELPA Syncer, 2022/07/07
- [nongnu] elpa/idle-highlight-mode 5881f796ad 57/59: Minor tweaks to code-comments, ELPA Syncer, 2022/07/07