[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/idle-highlight-mode 7f81263388 11/59: Add configurations f
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/idle-highlight-mode 7f81263388 11/59: Add configurations for excepted words and what idle time to use. |
Date: |
Thu, 7 Jul 2022 12:00:29 -0400 (EDT) |
branch: elpa/idle-highlight-mode
commit 7f812633883ac2af72dc3c36cf75c699afa2efd3
Author: Cornelius Mika <cornelius.mika@gmail.com>
Commit: Campbell Barton <ideasman42@gmail.com>
Add configurations for excepted words and what idle time to use.
(Proposed by Thomas Järvstrand)
---
idle-highlight-mode.el | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/idle-highlight-mode.el b/idle-highlight-mode.el
index 238da35433..550c20b5ee 100755
--- a/idle-highlight-mode.el
+++ b/idle-highlight-mode.el
@@ -66,6 +66,16 @@
(defvar idle-highlight-global-timer nil "Timer to trigger highlighting.")
+(defcustom idle-highlight-exceptions '("end")
+ "List of words to be excepted from highlighting."
+ :group 'idle-highlight
+ :type '(repeat string))
+
+(defcustom idle-highlight-idle-time 0.5
+ "Time after which to highlight the word at point."
+ :group 'idle-highlight
+ :type 'float)
+
(defun idle-highlight-word-at-point ()
"Highlight the word under the point."
(if idle-highlight-mode
@@ -78,8 +88,7 @@
(and
target-symbol (not (in-string-p))
(looking-at-p "\\s_\\|\\sw") ;; Symbol characters
- ;; TODO: no need to highlight keywords like if
- (not (equal target "end")))
+ (not (member target idle-highlight-exceptions)))
(setq idle-highlight-regexp (concat "\\<" (regexp-quote target) "\\>"))
(highlight-regexp idle-highlight-regexp 'idle-highlight)))))
@@ -96,7 +105,7 @@
(progn
(unless idle-highlight-global-timer
(setq idle-highlight-global-timer
- (run-with-idle-timer 0.5 :repeat 'idle-highlight-word-at-point)))
+ (run-with-idle-timer idle-highlight-idle-time :repeat
'idle-highlight-word-at-point)))
(set (make-local-variable 'idle-highlight-regexp) nil))
(idle-highlight-unhighlight)))
- [nongnu] elpa/idle-highlight-mode e6239e06fd 22/59: Add license file., (continued)
- [nongnu] elpa/idle-highlight-mode e6239e06fd 22/59: Add license file., ELPA Syncer, 2022/07/07
- [nongnu] elpa/idle-highlight-mode ac31f75fd0 28/59: Remove local variable when the mode is disabled, ELPA Syncer, 2022/07/07
- [nongnu] elpa/idle-highlight-mode c7af42119a 38/59: Cleanup: remove unnecessary variable, ELPA Syncer, 2022/07/07
- [nongnu] elpa/idle-highlight-mode 5418252a11 59/59: Change URL to codeberg, ELPA Syncer, 2022/07/07
- [nongnu] elpa/idle-highlight-mode 53b4e3c855 45/59: Add option idle-highlight-exceptions-syntax, ELPA Syncer, 2022/07/07
- [nongnu] elpa/idle-highlight-mode 459720cd2e 29/59: Add `global-idle-highlight-mode` (globalized minor mode), ELPA Syncer, 2022/07/07
- [nongnu] elpa/idle-highlight-mode defcfe2756 54/59: Fix #1 face exceptions interact badly with hl-line-mode, ELPA Syncer, 2022/07/07
- [nongnu] elpa/idle-highlight-mode 1f40f80921 30/59: Remove "end" from idle-highlight-exceptions, ELPA Syncer, 2022/07/07
- [nongnu] elpa/idle-highlight-mode 305e9d4aa0 26/59: Cleanup: remove intermediate symbol type variable, ELPA Syncer, 2022/07/07
- [nongnu] elpa/idle-highlight-mode eaac86a1a2 49/59: Add idle-highlight-visible-buffers to apply to all buffers, ELPA Syncer, 2022/07/07
- [nongnu] elpa/idle-highlight-mode 7f81263388 11/59: Add configurations for excepted words and what idle time to use.,
ELPA Syncer <=
- [nongnu] elpa/idle-highlight-mode 7c43cc3d7a 09/59: [Refactor] Lose some weight., ELPA Syncer, 2022/07/07
- [nongnu] elpa/idle-highlight-mode 3d785f0f1d 44/59: Support *-exceptions & *-exceptions-face to be callback functions, ELPA Syncer, 2022/07/07
- [nongnu] elpa/idle-highlight-mode e8f724fec2 35/59: Use a local list of overlays for highlighting, ELPA Syncer, 2022/07/07
- [nongnu] elpa/idle-highlight-mode a801e7113f 43/59: Remove 'idle-highlight-use-hi-lock-mode', ELPA Syncer, 2022/07/07
- [nongnu] elpa/idle-highlight-mode 97047f2574 33/59: Add Campbell Barton as an author, ELPA Syncer, 2022/07/07
- [nongnu] elpa/idle-highlight-mode 98d20252d6 42/59: readme: add "Motivation" & "Other Packages" section, ELPA Syncer, 2022/07/07
- [nongnu] elpa/idle-highlight-mode d0fcf29c7d 46/59: Cleanup: unnecessary pcase-let* use, ELPA Syncer, 2022/07/07