]> git.eshelyaron.com Git - emacs.git/commit
Add erc-server-396 response handler
authorF. Jason Park <jp@neverwas.me>
Sat, 19 Aug 2023 01:04:22 +0000 (18:04 -0700)
committerEshel Yaron <me@eshelyaron.com>
Thu, 21 Dec 2023 20:53:53 +0000 (21:53 +0100)
commit67eb255535ce595a80aa65a20b50b240a750494e
tree25499d2bd48cc496cb19ea6bc7103cab5fd34cce
parent840bb1053cb132e479946c377bbaba4e9e1ac5ef
Add erc-server-396 response handler

* lisp/erc/erc-backend.el (erc-server-396, erc-server-396-functions):
Define response handler for 396 numeric.  For now, always display the
message in the active buffer rather than bother with something like
`erc-once-with-server-event' to try and suss out when this is a
response to something client-initiated, like a /VHOST.  Do this
despite most users probably wanting the message to appear in the
server buffer alone when the response is server-initiated.  The
`labeled-response' extension will hopefully make dealing with such
matters less of a crapshoot.
* lisp/erc/erc.el (erc--parse-user-regexp-pedantic): Tweak slightly to
allow null groups and favor host.
(erc--parse-user-regexp-legacy, erc--parse-user-regexp): Remove the
first variable but preserve its value as that of the second.
(erc--parse-nuh): New function.  The behavior is nuanced and complex
and so not easily described in a doc string.
(erc-message-english-396): Define format template for 396 response.
* test/lisp/erc/erc-scenarios-misc-commands.el
(erc-scenarios-misc-commands--VHOST): New test.
* test/lisp/erc/erc-tests.el (erc-parse-user): Move "pedantic" section
to new test.
(erc--parse-nuh): New test.
* test/lisp/erc/resources/commands/vhost.eld: New test data file.
(Bug#67677)

(cherry picked from commit 4ee4865ce208c423afc8c2718922272509a4c1ae)
lisp/erc/erc-backend.el
lisp/erc/erc.el
test/lisp/erc/erc-scenarios-misc-commands.el
test/lisp/erc/erc-tests.el
test/lisp/erc/resources/commands/vhost.eld [new file with mode: 0644]