1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-21 06:55:39 +00:00

* lisp/hi-lock.el (hi-lock-revert-buffer-rehighlight): Fix lighter.

Add '(car pattern)' as the LIGHTER argument of 'highlight-regexp'.
This fixes the case when in a file buffer with fundamental-mode:
`C-s M-s ' the M-s h r RET`, revert the buffer with 'C-x x g',
get the prompt for unhighlight with 'M-s h u'.  This showed
a raw regexp instead of the human-readable lighter (bug#57534).
This commit is contained in:
Juri Linkov 2024-09-25 09:57:16 +03:00
parent c2d6f191d4
commit 0f424b16c3

View File

@ -891,7 +891,7 @@ Apply the previous patterns after reverting the buffer."
(let ((face (hi-lock-keyword->face (cdr pattern))))
(highlight-regexp (or (get-text-property 0 'regexp (car pattern))
(car pattern))
face)
face nil (car pattern))
(setq hi-lock--unused-faces
(remove (face-name face) hi-lock--unused-faces)))))))))