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

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

[nongnu] elpa/symbol-overlay 824cefc469 076/152: Use recommended syntax


From: ELPA Syncer
Subject: [nongnu] elpa/symbol-overlay 824cefc469 076/152: Use recommended syntax for setting overlay face property
Date: Thu, 7 Jul 2022 12:04:16 -0400 (EDT)

branch: elpa/symbol-overlay
commit 824cefc46940a502970288a2623dc74bf3c1e010
Author: Steve Purcell <steve@sanityinc.com>
Commit: GitHub <noreply@github.com>

    Use recommended syntax for setting overlay face property
    
    See 
https://www.gnu.org/software/emacs/manual/html_node/elisp/Overlay-Properties.html#Overlay-Properties
    
    The previous code was applying two anonymous faces, whereas this can 
instead be expressed as a single anonymous face.
---
 symbol-overlay.el | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/symbol-overlay.el b/symbol-overlay.el
index e986e71609..10ec8e3a90 100644
--- a/symbol-overlay.el
+++ b/symbol-overlay.el
@@ -249,8 +249,7 @@ This only effects symbols in the current displayed window."
 If COLOR is non-nil, use it as the overlay face's background color.
 Otherwise use `symbol-overlay-temp-face' as the face."
   (let ((ov (make-overlay (match-beginning 0) (match-end 0))))
-    (if color (progn (overlay-put ov 'face `((:background ,color)
-                                            (:foreground "black")))
+    (if color (progn (overlay-put ov 'face `(:background ,color :foreground 
"black"))
                     (overlay-put ov 'keymap symbol-overlay-map)
                     (overlay-put ov 'evaporate t)
                     (overlay-put ov 'symbol symbol))



reply via email to

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