]> git.eshelyaron.com Git - emacs.git/commitdiff
Don't list the default hi-lock faces twice in the future history
authorLars Ingebrigtsen <larsi@gnus.org>
Mon, 24 Jan 2022 18:51:55 +0000 (19:51 +0100)
committerLars Ingebrigtsen <larsi@gnus.org>
Mon, 24 Jan 2022 18:52:02 +0000 (19:52 +0100)
* lisp/hi-lock.el (hi-lock-read-face-name): Don't include faces
twice in the defaults (bug#19877).

lisp/hi-lock.el

index 0a01d90cbba42abaad431a5ef3993190f8dcde9a..a44d6ea10b77236e89b0bdd447ca4ec59fdad16f 100644 (file)
@@ -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)))