summaryrefslogtreecommitdiff
path: root/lisp/hi-lock.el
diff options
context:
space:
mode:
authorLars Ingebrigtsen <larsi@gnus.org>2020-10-15 17:45:12 +0200
committerLars Ingebrigtsen <larsi@gnus.org>2020-10-15 17:45:12 +0200
commit97b8c0adc1d6ce42c43829e1270c0ccd13a82382 (patch)
treec407229404a786c58f67dcf37aef8090dad643fe /lisp/hi-lock.el
parentc7b952c45c4aab86b8039c22dc95c4be8782a9e6 (diff)
downloademacs-97b8c0adc1d6ce42c43829e1270c0ccd13a82382.tar.gz
Make hi-lock-face-buffer more resilient
* lisp/hi-lock.el (hi-lock-face-buffer): If given a face name a string, convert it to a symbol first, as later usage of this expects a symbol and not a string (bug#43339).
Diffstat (limited to 'lisp/hi-lock.el')
-rw-r--r--lisp/hi-lock.el2
1 files changed, 2 insertions, 0 deletions
diff --git a/lisp/hi-lock.el b/lisp/hi-lock.el
index a81cefacb03..536a1af8462 100644
--- a/lisp/hi-lock.el
+++ b/lisp/hi-lock.el
@@ -493,6 +493,8 @@ the major mode specifies support for Font Lock."
'regexp-history-last)))
(hi-lock-read-face-name)
current-prefix-arg))
+ (when (stringp face)
+ (setq face (intern face)))
(or (facep face) (setq face 'hi-yellow))
(unless hi-lock-mode (hi-lock-mode 1))
(hi-lock-set-pattern