Function: htmlize-faces-in-buffer
htmlize-faces-in-buffer is a byte-compiled function defined in
htmlize.el.
Signature
(htmlize-faces-in-buffer)
Documentation
Return a list of faces used in the current buffer.
This is the set of faces specified by the face text property and by buffer
overlays that specify face.
Source Code
;; Defined in ~/.emacs.d/elpa/htmlize-20250724.1703/htmlize.el
(defun htmlize-faces-in-buffer ()
"Return a list of faces used in the current buffer.
This is the set of faces specified by the `face' text property and by buffer
overlays that specify `face'."
(let (faces)
;; Faces used by text properties.
(let ((pos (point-min)) face-prop next)
(while (< pos (point-max))
(setq face-prop (get-text-property pos 'face)
next (or (next-single-property-change pos 'face) (point-max)))
(setq faces (cl-nunion (htmlize-decode-face-prop face-prop)
faces :test 'equal))
(setq pos next)))
;; Faces used by overlays.
(dolist (overlay (overlays-in (point-min) (point-max)))
(let ((face-prop (overlay-get overlay 'face)))
(setq faces (cl-nunion (htmlize-decode-face-prop face-prop)
faces :test 'equal))))
faces))