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)
(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)))))))))