]> git.eshelyaron.com Git - emacs.git/commit
Don't call erc-auto-query twice on PRIVMSG
authorF. Jason Park <jp@neverwas.me>
Fri, 7 May 2021 08:52:41 +0000 (01:52 -0700)
committerF. Jason Park <jp@neverwas.me>
Thu, 30 Jun 2022 22:16:46 +0000 (15:16 -0700)
commit1767b0bd7e2883c9467ebf0e0aedee1fd90bcf92
tree3fd6f705293e8b1d5113348131cbd4d1a66a75f2
parent7c47d6c52d70225334444947824b40ad9f593c31
Don't call erc-auto-query twice on PRIVMSG

* lisp/erc/erc-backend.el (erc-server-JOIN): Use `erc--open-target'
instead of `erc-join'.
(erc-server-PRIVMSG): Don't call `erc-auto-query' at all, and instead
borrow the portion of its logic that detects when a query buffer
should be created instead of a channel buffer.

* lisp/erc/erc.el (erc-cmd-QUERY): Update the mode line explicitly
after calling `erc-query' in case it's needed after `erc-setup-buffer'
runs. Simplify.
(erc-query, erc--open-target): Replace uses of `erc-query'
with `erc--open-target' and make the former obsolete.  Don't call
`erc-update-mode-line' because `erc-open' already does that.
(erc-auto-query): Make this function obsolete.  It was previously only
used in erc-backend.el and only sewed confusion.
(erc-query-on-unjoined-chan-privmsg): Add note questioning its role.
It was previously only used by the now deprecated `erc-auto-query'.

* test/lisp/erc/erc-scenarios-misc.el
(erc-scenarios-base-mask-target-routing): Add test for server masks.
* test/lisp/erc/resources/base/mask-target-routing/foonet.eld: New file.
lisp/erc/erc-backend.el
lisp/erc/erc.el
test/lisp/erc/erc-scenarios-misc.el
test/lisp/erc/resources/base/mask-target-routing/foonet.eld [new file with mode: 0644]