Function: erc-track--get-faces-in-current-message

erc-track--get-faces-in-current-message is a byte-compiled function defined in erc-track.el.gz.

Signature

(erc-track--get-faces-in-current-message)

Documentation

Collect all faces in the narrowed buffer.

Return a cons of a hash table and a list ordered from most recently seen to earliest seen.

Source Code

;; Defined in /usr/src/emacs/lisp/erc/erc-track.el.gz
(defun erc-track--get-faces-in-current-message ()
  "Collect all faces in the narrowed buffer.
Return a cons of a hash table and a list ordered from most
recently seen to earliest seen."
  (let ((i (text-property-not-all (point-min) (point-max) 'font-lock-face nil))
        (seen (make-hash-table :test #'equal))
        ;;
        (rfaces ())
        (faces (make-hash-table :test #'equal)))
    (while-let ((i)
                (cur (get-text-property i 'face)))
      (unless (gethash cur seen)
        (puthash cur t seen)
        (when erc-track--face-reject-function
          (setq cur (funcall erc-track--face-reject-function cur)))
        (when cur
          (push cur rfaces)
          (puthash cur t faces)))
      (setq i (next-single-property-change i 'font-lock-face)))
    (cons faces rfaces)))