[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/eglot-inactive-regions b0ade8c12e 21/66: Handle face list
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/eglot-inactive-regions b0ade8c12e 21/66: Handle face list properties |
Date: |
Fri, 6 Dec 2024 06:59:53 -0500 (EST) |
branch: elpa/eglot-inactive-regions
commit b0ade8c12ef8466f93317c3d86669c6180734057
Author: Filippo Argiolas <filippo.argiolas@gmail.com>
Commit: Filippo Argiolas <filippo.argiolas@gmail.com>
Handle face list properties
Still looking into this, sometimes get-text-property can return a list
of faces (e.g. when they are added with add-face-text-property). Take
the first one of the list when this happens.
So far with C modes I only saw it with #ifndef that has both
font-lock-preprocessor-face and font-lock-negation-char-face in the n
letter.
---
clangd-inactive-regions.el | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/clangd-inactive-regions.el b/clangd-inactive-regions.el
index 6ad6c238f5..1ec86f0e0a 100644
--- a/clangd-inactive-regions.el
+++ b/clangd-inactive-regions.el
@@ -129,8 +129,11 @@ Allowed methods:
(font-lock-flush))
(defun clangd-inactive-regions--get-face (pos)
- (or (get-text-property pos 'face)
- 'default))
+ (let ((face-prop
+ (or (get-text-property pos 'face) 'default)))
+ (if (listp face-prop)
+ (car face-prop)
+ face-prop)))
(defun clangd-inactive-regions--make-darken-face (parent-face)
"Return a new face from PARENT-FACE blending background and
- [nongnu] branch elpa/eglot-inactive-regions created (now 2c83a3230d), ELPA Syncer, 2024/12/06
- [nongnu] elpa/eglot-inactive-regions f47d728c65 11/66: Stage basic README, ELPA Syncer, 2024/12/06
- [nongnu] elpa/eglot-inactive-regions 65fbd7a7a1 08/66: Support for different shading methods to render inactive regions, ELPA Syncer, 2024/12/06
- [nongnu] elpa/eglot-inactive-regions ea8da46342 01/66: Initial commit, ELPA Syncer, 2024/12/06
- [nongnu] elpa/eglot-inactive-regions 9dba1b222d 14/66: Check for valid ranges when setting parameters, ELPA Syncer, 2024/12/06
- [nongnu] elpa/eglot-inactive-regions 4f5ab3203c 17/66: No need to copy-tree ranges, ELPA Syncer, 2024/12/06
- [nongnu] elpa/eglot-inactive-regions 5528f4d3e1 03/66: fix gpl preamble, ELPA Syncer, 2024/12/06
- [nongnu] elpa/eglot-inactive-regions 4fc6480bed 18/66: Move forward if forward-same-syntax does not, ELPA Syncer, 2024/12/06
- [nongnu] elpa/eglot-inactive-regions 2e52c1a10a 19/66: Use my own forward function, ELPA Syncer, 2024/12/06
- [nongnu] elpa/eglot-inactive-regions 3876101626 31/66: Update README., ELPA Syncer, 2024/12/06
- [nongnu] elpa/eglot-inactive-regions b0ade8c12e 21/66: Handle face list properties,
ELPA Syncer <=
- [nongnu] elpa/eglot-inactive-regions 3d3280c415 48/66: rename to eglot-inactive-regions.el, ELPA Syncer, 2024/12/06
- [nongnu] elpa/eglot-inactive-regions 475864a1a3 65/66: exclude screenshots from the tarball, ELPA Syncer, 2024/12/06
- [nongnu] elpa/eglot-inactive-regions 17c9db32d3 02/66: initial commit, ELPA Syncer, 2024/12/06
- [nongnu] elpa/eglot-inactive-regions e15124a898 07/66: Rewrite the darkening logic using fontify-region, ELPA Syncer, 2024/12/06
- [nongnu] elpa/eglot-inactive-regions e7be73b354 15/66: Invert shading factor, ELPA Syncer, 2024/12/06
- [nongnu] elpa/eglot-inactive-regions b81249c566 23/66: Update README with caveats section, ELPA Syncer, 2024/12/06
- [nongnu] elpa/eglot-inactive-regions 4b01aba42f 29/66: Fix package-lint warnings, ELPA Syncer, 2024/12/06
- [nongnu] elpa/eglot-inactive-regions 2346944d4b 05/66: Add clean up and refresh functions, ELPA Syncer, 2024/12/06
- [nongnu] elpa/eglot-inactive-regions 3ba8e528f1 06/66: allow to change opacity on the fly, ELPA Syncer, 2024/12/06
- [nongnu] elpa/eglot-inactive-regions 10f1772888 09/66: Drop eglot from the name, ELPA Syncer, 2024/12/06