From 373df51e82dc4101ceb541ffae7d60bcdec457c8 Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Wed, 25 Sep 2024 09:57:16 +0300 Subject: [PATCH] * 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). (cherry picked from commit 0f424b16c37fce82a586014f32f8513f86786e4e) --- lisp/hi-lock.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/hi-lock.el b/lisp/hi-lock.el index 6d827a055a5..b751fc61789 100644 --- a/lisp/hi-lock.el +++ b/lisp/hi-lock.el @@ -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))))))))) -- 2.39.5