* lisp/erc/erc-button.el (erc-button--nick): Remove `face' slot, which
was set to `erc-button-face' by default. It's ignored when the button
is a nick and thus useless and misleading.
(erc-button-add-nickname-buttons): Rework and reflow for readability.
Don't bind or set `erc-button' face because it's ignored when dealing
with nicks. Don't return the value of face options when calling a
`form' function because they can be nil in practice even though their
Custom type specs do not say so.
* lisp/erc/erc-common.el (erc--with-dependent-type-match): Add helper
macro for Custom :type defs that incur warnings from `setopt' due to
some missing dependency. This occurs when specifying a :type of
`face' instead of `symbol' and the option's default value includes
faces from another library that hasn't been loaded.
* lisp/erc/erc.el (erc--get-speaker-bounds): New helper function to
retrieve bounds of a speaker label when present.
* test/lisp/erc/erc-tests.el (erc--with-dependent-type-match): Add
test. (Bug#64301)