]> git.eshelyaron.com Git - emacs.git/commitdiff
Make hi-lock-face-buffer more resilient
authorLars Ingebrigtsen <larsi@gnus.org>
Thu, 15 Oct 2020 15:45:12 +0000 (17:45 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Thu, 15 Oct 2020 15:45:12 +0000 (17:45 +0200)
* 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).

lisp/hi-lock.el

index a81cefacb030fe2190a03430830d5c7a6c011050..536a1af84620dec39489b5d4e13b877f68336d4b 100644 (file)
@@ -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