summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Ingebrigtsen <larsi@gnus.org>2022-01-24 19:51:55 +0100
committerLars Ingebrigtsen <larsi@gnus.org>2022-01-24 19:52:02 +0100
commitee87c2f8ca30e9b4221656b00abb25ee9f532040 (patch)
tree70b98ec96e60e59d56071d71610f0f10d1a7a1d6
parent8f16b1aef1b194a0b56bcc3a8647620828954015 (diff)
downloademacs-ee87c2f8ca30e9b4221656b00abb25ee9f532040.tar.gz
Don't list the default hi-lock faces twice in the future history
* lisp/hi-lock.el (hi-lock-read-face-name): Don't include faces twice in the defaults (bug#19877).
-rw-r--r--lisp/hi-lock.el8
1 files changed, 5 insertions, 3 deletions
diff --git a/lisp/hi-lock.el b/lisp/hi-lock.el
index 0a01d90cbba..a44d6ea10b7 100644
--- a/lisp/hi-lock.el
+++ b/lisp/hi-lock.el
@@ -723,9 +723,11 @@ with completion and history."
(when hi-lock-interactive-patterns
(face-name (hi-lock-keyword->face
(car hi-lock-interactive-patterns)))))
- (defaults (append hi-lock--unused-faces
- (cdr (member last-used-face hi-lock-face-defaults))
- hi-lock-face-defaults))
+ (defaults (seq-uniq
+ (append hi-lock--unused-faces
+ (cdr (member last-used-face hi-lock-face-defaults))
+ hi-lock-face-defaults)
+ #'equal))
face)
(if (and hi-lock-auto-select-face (not current-prefix-arg))
(setq face (or (pop hi-lock--unused-faces) (car defaults)))