diff --git a/lisp/erc/erc-common.el b/lisp/erc/erc-common.el index 1a0b9c323d1..aa176a14b46 100644 --- a/lisp/erc/erc-common.el +++ b/lisp/erc/erc-common.el @@ -572,7 +572,12 @@ Use the CASEMAPPING ISUPPORT parameter to determine the style." (when erc-channel-members-changed-hook (run-hooks 'erc-channel-members-changed-hook)))))))) -(defmacro erc--with-dependent-type-match (type &rest features) +;; The default values of some ERC's options contain items defined in +;; other libraries that may not be loaded when `setopt' is invoked on +;; the option, which results in an unfriendly warning. User configs can +;; simply `require' such dependencies beforehand, but that's often +;; undesirable in ERC's own library code. +(defmacro erc--custom-with-type-match-features (type &rest features) "Massage Custom :type TYPE with :match function that pre-loads FEATURES." `(backquote-list* ',(car type) :match (lambda (w v) diff --git a/lisp/erc/erc-track.el b/lisp/erc/erc-track.el index 6306df3fa2a..91466b9d5e3 100644 --- a/lisp/erc/erc-track.el +++ b/lisp/erc/erc-track.el @@ -215,7 +215,7 @@ Note that ERC prioritizes certain faces reserved for critical messages regardless of this option's value." :package-version '(ERC . "5.6.1") :set #'erc-track--massage-nick-button-faces - :type (erc--with-dependent-type-match + :type (erc--custom-with-type-match-features (repeat (choice face (repeat :tag "Combination" face))) erc-button)) @@ -259,7 +259,7 @@ module. To see your changes reflected mid-session, cycle The effect may be disabled by setting this variable to nil." :package-version '(ERC . "5.6.1") :set #'erc-track--massage-nick-button-faces - :type (erc--with-dependent-type-match + :type (erc--custom-with-type-match-features (repeat (choice face (repeat :tag "Combination" face))) erc-button))