[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#13297: hi-lock-unface-buffer fails on face lists
From: |
Stefan Monnier |
Subject: |
bug#13297: hi-lock-unface-buffer fails on face lists |
Date: |
Mon, 28 Jan 2013 15:03:13 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
> The problem is due to the mistaken assumption about the nature of face,
> as captured by the comment line below.
Oh, indeed, thank you. I installed the patch below which should fix it,
Stefan
=== modified file 'lisp/hi-lock.el'
--- lisp/hi-lock.el 2013-01-02 16:13:04 +0000
+++ lisp/hi-lock.el 2013-01-28 19:59:39 +0000
@@ -562,7 +562,8 @@
(when keyword
(let ((face (hi-lock-keyword->face keyword)))
;; Make `face' the next one to use by default.
- (add-to-list 'hi-lock--unused-faces (face-name face)))
+ (when (symbolp face) ;Don't add it if it's a list (bug#13297).
+ (add-to-list 'hi-lock--unused-faces (face-name face))))
(font-lock-remove-keywords nil (list keyword))
(setq hi-lock-interactive-patterns
(delq keyword hi-lock-interactive-patterns))