aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorJuri Linkov2020-04-14 02:33:52 +0300
committerJuri Linkov2020-04-14 02:33:52 +0300
commit7a9fb5d55c9bf612a38348d59e769ee915175e28 (patch)
tree45b38be9f4d13d8a5a0069d20f940a8410b4350c /lisp
parent086faceb1c395d24487c20bcb32ca710291bee41 (diff)
downloademacs-7a9fb5d55c9bf612a38348d59e769ee915175e28.tar.gz
emacs-7a9fb5d55c9bf612a38348d59e769ee915175e28.zip
Fix hi-lock test and add new test for unhighlight (bug#40337)
* lisp/hi-lock.el (hi-lock-unface-buffer): Use hi-lock--hashcons only on strings, not lists. * test/lisp/hi-lock-tests.el (hi-lock-bug26666): Revert previous change, use "a" instead of "b". (hi-lock-unhighlight): New test.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/hi-lock.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/hi-lock.el b/lisp/hi-lock.el
index 1d8dc0624ba..bf79e48f856 100644
--- a/lisp/hi-lock.el
+++ b/lisp/hi-lock.el
@@ -681,8 +681,8 @@ then remove all hi-lock highlighting."
681 (delq keyword hi-lock-interactive-patterns)) 681 (delq keyword hi-lock-interactive-patterns))
682 (remove-overlays 682 (remove-overlays
683 nil nil 'hi-lock-overlay-regexp 683 nil nil 'hi-lock-overlay-regexp
684 (hi-lock--hashcons (or (car (rassq keyword hi-lock-interactive-lighters)) 684 (or (car (rassq keyword hi-lock-interactive-lighters))
685 (car keyword)))) 685 (hi-lock--hashcons (car keyword))))
686 (setq hi-lock-interactive-lighters 686 (setq hi-lock-interactive-lighters
687 (rassq-delete-all keyword hi-lock-interactive-lighters)) 687 (rassq-delete-all keyword hi-lock-interactive-lighters))
688 (font-lock-flush)))) 688 (font-lock-flush))))