Function: erc-nicks-list-faces

erc-nicks-list-faces is an interactive and byte-compiled function defined in erc-nicks.el.gz.

Signature

(erc-nicks-list-faces)

Documentation

Show faces owned by ERC-nicks in a help buffer.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/erc/erc-nicks.el.gz
(defun erc-nicks-list-faces ()
  "Show faces owned by ERC-nicks in a help buffer."
  (interactive)
  (save-excursion
    (list-faces-display (rx bot "erc-nicks-"))
    (with-current-buffer "*Faces*"
      (setq help-xref-stack nil
            help-xref-stack-item '(erc-nicks-list-faces))
      (with-silent-modifications
        (goto-char (point-min))
        (while (zerop (forward-line))
          (when (and (get-text-property (point) 'button)
                     (facep (car (button-get (point) 'help-args))))
            (button-put (point) 'help-function
                        #'erc-nicks--list-faces-help-button-action)
            (if-let ((face (car (button-get (point) 'help-args)))
                     ((not (get face 'erc-nicks--custom-face)))
                     ((not (get face 'erc-nicks--key))))
                (progn (delete-region (pos-bol) (1+ (pos-eol)))
                       (forward-line -1))
              (when-let ((nid (get face 'erc-nicks--netid))
                         (net (symbol-name (erc-networks--id-symbol nid))))
                (goto-char (button-end (point)))
                (skip-syntax-forward "-")
                (put-text-property (point) (1+ (point)) 'rear-nonsticky nil)
                (forward-char)
                (when (stringp (face-foreground face))
                  (setq net (format "%-13.13s %s" (substring-no-properties
                                                   (face-foreground face))
                                    net)))
                (insert-and-inherit net)
                (delete-region (button-start (point))
                               (1+ (button-start (point))))
                (delete-region (point) (pos-eol))))))))))