diff --git a/lisp/hi-lock.el b/lisp/hi-lock.el index b70d4a7569..05584b8dc3 100644 --- a/lisp/hi-lock.el +++ b/lisp/hi-lock.el @@ -712,6 +712,13 @@ hi-lock-regexp-okay (error "Regexp cannot match an empty string")) (t regexp))) +(defun hi-lock-decorate-face-names (faces) + (mapcar + (lambda (face) + (list face "" (concat "\t" + (propertize "EXAMPLE" 'face (intern-soft face))))) + faces)) + (defun hi-lock-read-face-name () "Return face for interactive highlighting. When `hi-lock-auto-select-face' is non-nil, just return the next face. @@ -726,6 +733,8 @@ hi-lock-read-face-name (defaults (append hi-lock--unused-faces (cdr (member last-used-face hi-lock-face-defaults)) hi-lock-face-defaults)) + (completion-extra-properties + '(:affixation-function hi-lock-decorate-face-names)) face) (if (and hi-lock-auto-select-face (not current-prefix-arg)) (setq face (or (pop hi-lock--unused-faces) (car defaults)))