diff options
| author | Juri Linkov | 2020-04-21 02:48:22 +0300 |
|---|---|---|
| committer | Juri Linkov | 2020-04-21 02:48:22 +0300 |
| commit | 856d9378a49ec9ec1af2ea74fb9309fe4c39cd1d (patch) | |
| tree | 5186a4e406735e944af28537655425639586b0fa | |
| parent | ec248719327f6efc1c250259d6b6f1da02d3b363 (diff) | |
| download | emacs-856d9378a49ec9ec1af2ea74fb9309fe4c39cd1d.tar.gz emacs-856d9378a49ec9ec1af2ea74fb9309fe4c39cd1d.zip | |
* lisp/hi-lock.el (hi-lock--regexps-at-point): Use proper-list-p, not consp.
| -rw-r--r-- | lisp/hi-lock.el | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lisp/hi-lock.el b/lisp/hi-lock.el index bf79e48f856..08d82173e41 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." | |||
| 567 | (let* ((faces-after (get-text-property (point) 'face)) | 567 | (let* ((faces-after (get-text-property (point) 'face)) |
| 568 | (faces-before | 568 | (faces-before |
| 569 | (unless (bobp) (get-text-property (1- (point)) 'face))) | 569 | (unless (bobp) (get-text-property (1- (point)) 'face))) |
| 570 | (faces-after (if (consp faces-after) faces-after (list faces-after))) | 570 | ;; Use proper-list-p to handle faces like (foreground-color . "red3") |
| 571 | (faces-before (if (consp faces-before) faces-before (list faces-before))) | 571 | (faces-after (if (proper-list-p faces-after) faces-after (list faces-after))) |
| 572 | (faces-before (if (proper-list-p faces-before) faces-before (list faces-before))) | ||
| 572 | (faces (mapcar #'hi-lock-keyword->face | 573 | (faces (mapcar #'hi-lock-keyword->face |
| 573 | hi-lock-interactive-patterns)) | 574 | hi-lock-interactive-patterns)) |
| 574 | (face-after (seq-some (lambda (face) (car (memq face faces))) faces-after)) | 575 | (face-after (seq-some (lambda (face) (car (memq face faces))) faces-after)) |