summaryrefslogtreecommitdiff
path: root/lisp/erc/erc-capab.el
diff options
context:
space:
mode:
authorF. Jason Park <jp@neverwas.me>2023-01-14 19:05:59 -0800
committerF. Jason Park <jp@neverwas.me>2023-04-08 14:23:51 -0700
commit0d3ccdbde441a0eed5d80d64aea429bc9a6457a3 (patch)
tree1d21e0fa19796fa886668f64832779835b76a930 /lisp/erc/erc-capab.el
parent2d876a4ca94d7c74339eb18ca98528d017cab2a8 (diff)
downloademacs-0d3ccdbde441a0eed5d80d64aea429bc9a6457a3.tar.gz
Don't associate ERC modules with undefined groups
* lisp/erc/erc-capab.el: Add property crutch to help ERC find module's Custom group. * lisp/erc/erc-common.el (erc--find-group): Add new function, a helper for finding an existing ERC module's Custom group based on `define-erc-module' params. Prefer `group-documentation' as a sentinel over symbol properties owned by Customize because they might not be present if the group isn't yet associated with any custom variables. (define-erc-module): Set `:group' keyword value more accurately, falling back to `erc' when no associated group has been defined. * test/lisp/erc/erc-tests.el (erc--find-group, erc--find-group--real): New tests. (define-erc-module--global, define-erc-module--local): Expect the `:group' keyword to be the unevaluated `erc--find-group' form. (Bug#60935.)
Diffstat (limited to 'lisp/erc/erc-capab.el')
-rw-r--r--lisp/erc/erc-capab.el1
1 files changed, 1 insertions, 0 deletions
diff --git a/lisp/erc/erc-capab.el b/lisp/erc/erc-capab.el
index 650c5fa84ac..bb0921da7f0 100644
--- a/lisp/erc/erc-capab.el
+++ b/lisp/erc/erc-capab.el
@@ -89,6 +89,7 @@ character not found in IRC nicknames to avoid confusion."
;;; Define module:
;;;###autoload(autoload 'erc-capab-identify-mode "erc-capab" nil t)
+(put 'capab-identify 'erc-group 'erc-capab)
(define-erc-module capab-identify nil
"Handle dancer-ircd's CAPAB IDENTIFY-MSG and IDENTIFY-CTCP."
;; append so that `erc-server-parameters' is already set by `erc-server-005'