]> git.eshelyaron.com Git - emacs.git/commit
Redo erc-nickname-in-use-functions as a local module
authorF. Jason Park <jp@neverwas.me>
Fri, 9 Jun 2023 06:49:23 +0000 (23:49 -0700)
committerF. Jason Park <jp@neverwas.me>
Sat, 1 Jul 2023 14:21:30 +0000 (07:21 -0700)
commit6ce957154b701282217191d47764187535754529
tree6a117a01cacc868bcac62c788e862cc4ab7da17e
parent99d74dcd45938e2686d93eb5649800e14a88cd84
Redo erc-nickname-in-use-functions as a local module

* etc/ERC-NEWS: Mention new module `services-regain'.
* lisp/erc/erc-backend.el: Rename option.
* lisp/erc/erc-services.el (erc-services-regain-alist): Strategies for
regaining a lost nickname on reconnect.  This option, in addition to
the rest of these changes, is a redo of
`erc-nickname-in-use-functions' from commit 8c0c9826 "Add hook to
regain nickname in ERC", which originally stemmed from bug#62044.
(erc-services-retry-nick-on-connect, erc-services-issue-regain,
erc-services-issue-ghost-and-retry-nick): New function variants for
`erc-services-regain-alist.
(erc-services-regain-mode, erc-services-regain-enable,
erc-services-regain-disable): New local module to activate
nick-regaining behavior.
(erc--nickname-in-use-make-request): New method, a services-specific
implementation.
* lisp/erc/erc.el (erc--nickname-in-use-make-request): New generic
function to request alternate nick when first choice is rejected.
(erc-nickname-in-use): Call `erc--nickname-in-use-make-request' to
request alternate nick.
* test/lisp/erc/erc-scenarios-services-misc.el
(erc-scenarios-services-misc--reconnect-retry-nick): Adopt renamed
version of `erc-scenarios-base-renick-auto-regain'.
(erc-scenarios-services-misc--regain-command,
erc-scenarios-services-misc--ghost-and-retry-nick): New tests.
* test/lisp/erc/resources/services/regain/reconnect-retry-again.eld:
New test data file reusing existing blob c0529052 that once lived at
resources/base/renick/regain/normal-again.eld.
* test/lisp/erc/resources/services/regain/reconnect-retry.eld: New
test data file reusing existing blob 9f4df70e5 that once lived at
resources/base/renick/regain/normal.eld.
* test/lisp/erc/resources/services/regain/taken-ghost.eld: New test
data file.
* test/lisp/erc/resources/services/regain/taken-regain.eld New test
data file.
etc/ERC-NEWS
lisp/erc/erc-backend.el
lisp/erc/erc-services.el
lisp/erc/erc.el
test/lisp/erc/erc-scenarios-services-misc.el
test/lisp/erc/resources/services/regain/reconnect-retry-again.eld [new file with mode: 0644]
test/lisp/erc/resources/services/regain/reconnect-retry.eld [new file with mode: 0644]
test/lisp/erc/resources/services/regain/taken-ghost.eld [new file with mode: 0644]
test/lisp/erc/resources/services/regain/taken-regain.eld [new file with mode: 0644]