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

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

[nongnu] elpa/spell-fu 50be652a6e 77/86: Fix overlay faces masking other


From: ELPA Syncer
Subject: [nongnu] elpa/spell-fu 50be652a6e 77/86: Fix overlay faces masking other faces (when checking faces-at-point)
Date: Thu, 7 Jul 2022 12:03:45 -0400 (EDT)

branch: elpa/spell-fu
commit 50be652a6ec8590c3098f46094a92213623349c1
Author: Campbell Barton <ideasman42@gmail.com>
Commit: Campbell Barton <ideasman42@gmail.com>

    Fix overlay faces masking other faces (when checking faces-at-point)
---
 changelog.rst | 1 +
 spell-fu.el   | 5 ++++-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/changelog.rst b/changelog.rst
index c1ee15650f..b11094967b 100644
--- a/changelog.rst
+++ b/changelog.rst
@@ -4,6 +4,7 @@ Change Log
 ##########
 
 - In development.
+  - Fix faces of overlays (such as ``hl-line-mode``) no longer mask other 
faces when selecting words to check.
   - Support for multiple dictionaries at once.
   - Reduce idle overlay fragmentation.
   - Idle timers now update buffers that have lost focus.
diff --git a/spell-fu.el b/spell-fu.el
index 591116c068..2c41292825 100644
--- a/spell-fu.el
+++ b/spell-fu.el
@@ -316,7 +316,10 @@ Argument POS return faces at this point."
   (let
     ( ;; List of faces to return.
       (faces nil)
-      (faceprop (or (get-char-property pos 'read-face-name) (get-char-property 
pos 'face))))
+      ;; NOTE: use `get-text-property' instead of `get-char-property' so 
overlays are excluded,
+      ;; since this causes overlays with `hl-line-mode' (for example) to mask 
other faces.
+      ;; If we want to include faces of overlays, this could be supported.
+      (faceprop (or (get-text-property pos 'read-face-name) (get-text-property 
pos 'face))))
     (cond
       ((facep faceprop)
         (push faceprop faces))



reply via email to

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