emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/symbol-overlay 3e6bd879c7 1/6: Add `symbol-overlay-temp-hi


From: ELPA Syncer
Subject: [nongnu] elpa/symbol-overlay 3e6bd879c7 1/6: Add `symbol-overlay-temp-highlight-single' custom setting.
Date: Sat, 29 Jul 2023 04:12:50 -0400 (EDT)

branch: elpa/symbol-overlay
commit 3e6bd879c7245df5139f2975288044671dee62ad
Author: Bo Lin <bo@dreamsphere.org>
Commit: Bo Lin <bo@dreamsphere.org>

    Add `symbol-overlay-temp-highlight-single' custom setting.
    
    This boolean variable controls whether temporary highlighting will be
    applied to symbols that occur only once in the current buffer.
---
 symbol-overlay.el | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/symbol-overlay.el b/symbol-overlay.el
index 28f7753364..bb1905c55c 100644
--- a/symbol-overlay.el
+++ b/symbol-overlay.el
@@ -151,6 +151,12 @@
   :group 'symbol-overlay
   :type 'boolean)
 
+(defcustom symbol-overlay-temp-highlight-single nil
+  "When non-nil, also apply temporary highlighting to symbols
+that occur only once."
+  :group 'symbol-overlay
+  :type 'boolean)
+
 (defcustom symbol-overlay-idle-time 0.5
   "Idle time after every command and before the temporary highlighting."
   :group 'symbol-overlay
@@ -321,7 +327,7 @@ This only affects symbols in the current displayed window if
                 (while (re-search-forward re nil t)
                   (symbol-overlay-put-one symbol)
                   (or p (setq p t))))
-              (when p
+              (when (or symbol-overlay-temp-highlight-single p)
                 (symbol-overlay-put-one symbol)
                 (setq symbol-overlay-temp-symbol symbol)))))))))
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]