emacs-diffs
[Top][All Lists]
Advanced

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

master 856d937: * lisp/hi-lock.el (hi-lock--regexps-at-point): Use prope


From: Juri Linkov
Subject: master 856d937: * lisp/hi-lock.el (hi-lock--regexps-at-point): Use proper-list-p, not consp.
Date: Mon, 20 Apr 2020 19:48:31 -0400 (EDT)

branch: master
commit 856d9378a49ec9ec1af2ea74fb9309fe4c39cd1d
Author: Juri Linkov <address@hidden>
Commit: Juri Linkov <address@hidden>

    * lisp/hi-lock.el (hi-lock--regexps-at-point): Use proper-list-p, not consp.
---
 lisp/hi-lock.el | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lisp/hi-lock.el b/lisp/hi-lock.el
index bf79e48..08d8217 100644
--- a/lisp/hi-lock.el
+++ b/lisp/hi-lock.el
@@ -567,8 +567,9 @@ in which case the highlighting will not update as you type."
     (let* ((faces-after (get-text-property (point) 'face))
            (faces-before
             (unless (bobp) (get-text-property (1- (point)) 'face)))
-           (faces-after (if (consp faces-after) faces-after (list 
faces-after)))
-           (faces-before (if (consp faces-before) faces-before (list 
faces-before)))
+           ;; Use proper-list-p to handle faces like (foreground-color . 
"red3")
+           (faces-after (if (proper-list-p faces-after) faces-after (list 
faces-after)))
+           (faces-before (if (proper-list-p faces-before) faces-before (list 
faces-before)))
            (faces (mapcar #'hi-lock-keyword->face
                           hi-lock-interactive-patterns))
            (face-after (seq-some (lambda (face) (car (memq face faces))) 
faces-after))



reply via email to

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