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

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

[nongnu] elpa/idle-highlight-mode defcfe2756 54/59: Fix #1 face exceptio


From: ELPA Syncer
Subject: [nongnu] elpa/idle-highlight-mode defcfe2756 54/59: Fix #1 face exceptions interact badly with hl-line-mode
Date: Thu, 7 Jul 2022 12:00:33 -0400 (EDT)

branch: elpa/idle-highlight-mode
commit defcfe2756a50911a71d4eeb3f0a353baf019a7e
Author: Campbell Barton <ideasman42@gmail.com>
Commit: Campbell Barton <ideasman42@gmail.com>

    Fix #1 face exceptions interact badly with hl-line-mode
---
 changelog.rst          | 3 ++-
 idle-highlight-mode.el | 4 +++-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/changelog.rst b/changelog.rst
index baae007619..0fb8801733 100644
--- a/changelog.rst
+++ b/changelog.rst
@@ -1,5 +1,6 @@
-- In development (2021-08-29)
+- In development (2022-01-20)
 
+  - Fix #1 font face detection when overlays were in use (such as 
``hl-line-mode``).
   - Fix highlighting with multiple windows sharing one buffer.
   - Add ``idle-highlight-visible-buffers`` to support highlighting all buffers 
with the current symbol.
   - Add ``idle-highlight-exceptions-syntax`` so the characters used in the 
syntax-table used can be customized.
diff --git a/idle-highlight-mode.el b/idle-highlight-mode.el
index 42afa6fb3a..331c740896 100755
--- a/idle-highlight-mode.el
+++ b/idle-highlight-mode.el
@@ -126,7 +126,9 @@ 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 
keywords, see: #1.
+      (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]