>From 636bec56194f964907c5cf5d37f2cb18e338e64e Mon Sep 17 00:00:00 2001 From: "F. Jason Park" Date: Tue, 14 Mar 2023 06:14:10 -0700 Subject: [PATCH 0/7] *** NOT A PATCH *** *** BLURB HERE *** F. Jason Park (7): [5.6] Honor arbitrary CHANTYPES in ERC [5.6] Copy over upstream Compat macros to erc-compat [5.6] Leverage loaddefs for migrating ERC modules [5.6] Don't require erc-goodies in erc.el [5.6] Modify erc-mode-map in module definitions [5.6] Add missing colors to erc-irccontrols-mode [5.6] Convert ERC's Imenu integration into proper module lisp/erc/erc-backend.el | 2 +- lisp/erc/erc-button.el | 6 +- lisp/erc/erc-common.el | 39 +---- lisp/erc/erc-compat.el | 52 +++++- lisp/erc/erc-goodies.el | 117 ++++++++----- lisp/erc/erc-ibuffer.el | 1 + lisp/erc/erc-imenu.el | 23 ++- lisp/erc/erc-log.el | 8 +- lisp/erc/erc-match.el | 8 +- lisp/erc/erc-page.el | 4 + lisp/erc/erc-pcomplete.el | 2 + lisp/erc/erc-services.el | 1 + lisp/erc/erc-sound.el | 1 + lisp/erc/erc-speedbar.el | 1 + lisp/erc/erc-stamp.el | 4 + lisp/erc/erc.el | 108 ++++++++---- test/lisp/erc/erc-goodies-tests.el | 253 +++++++++++++++++++++++++++++ test/lisp/erc/erc-tests.el | 187 +++++++++++++++++++-- 18 files changed, 675 insertions(+), 142 deletions(-) create mode 100644 test/lisp/erc/erc-goodies-tests.el Interdiff: diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el index 1315bce2e54..e122f32d96a 100644 --- a/lisp/erc/erc.el +++ b/lisp/erc/erc.el @@ -1850,7 +1850,9 @@ erc-modules (when-let* (((eq (car entry) 'const)) (s (cadddr entry))) ; (const :tag "..." ,s) (put s 'erc--module s))) - (custom-initialize-default symbol exp)) + (custom-initialize-reset symbol exp) + (put symbol 'standard-value + (list (custom-quote (default-toplevel-value symbol))))) :set (lambda (sym val) ;; disable modules which have just been removed (when (and (boundp 'erc-modules) erc-modules val) @@ -1873,6 +1875,7 @@ erc-modules (if (get v 'erc--module) (push v built-in) (push v third-party))) + ;; Calling `set-default-toplevel-value' complicates testing (set sym (append (sort built-in #'string-lessp) (nreverse third-party)))) ;; this test is for the case where erc hasn't been loaded yet -- 2.39.2