]> git.eshelyaron.com Git - emacs.git/commit
Skip erc-ignored-user-p when erc-ignore-list is empty
authorF. Jason Park <jp@neverwas.me>
Tue, 12 Sep 2023 04:21:42 +0000 (21:21 -0700)
committerEshel Yaron <me@eshelyaron.com>
Thu, 21 Dec 2023 20:53:54 +0000 (21:53 +0100)
commit2bca77754905192da89b13f2c941faa9d1c86b29
treefc5f6688fd4d69c108792380e508bad06b595a40
parent3edff5608941dcfc686d923e63fb7510fa50e1c1
Skip erc-ignored-user-p when erc-ignore-list is empty

* lisp/erc/erc-backend.el (erc-server-PRIVMSG): Don't bother running
`erc-ignored-user-p' and `erc-ignored-reply-p' when their associated
options are null.  The option `erc-ignore-list' is buffer-local when
set, and `erc-ignored-user-p' looks for it in the server buffer.
Moreover, all functions that set it, like `erc-cmd-IGNORE' and
`erc-cmd-UNIGNORE', do so in the server buffer.  And the response
handler in question only runs in server buffers, so this shouldn't
break anything.  Also, remove stray call to reassign trailing response
contents.
* lisp/erc/erc-common.el (erc-get-server-user): Rearrange so
`erc-with-server-buffer' doesn't have to switch to the server buffer
because `erc-downcase' can run in channels as well.
* lisp/erc/erc.el (erc-ignored-user-p): Add comment.  (Bug#67677)

(cherry picked from commit c1befaf0a8b19fdd3b22e824f4bfc10f8882db67)
lisp/erc/erc-backend.el
lisp/erc/erc-common.el
lisp/erc/erc.el