]> git.eshelyaron.com Git - emacs.git/commit
Add interface for finding users in erc-server-PRIVMSG
authorF. Jason Park <jp@neverwas.me>
Fri, 28 Apr 2023 13:34:09 +0000 (06:34 -0700)
committerF. Jason Park <jp@neverwas.me>
Sat, 6 May 2023 00:18:01 +0000 (17:18 -0700)
commitba44b4818446afdda4ff04c92d4ea34803fbc9db
tree93793c2693536e5748d51168da8780d4c04ba7d5
parentd141f7149b67daa93ac13420ee5edf4b0cbbf011
Add interface for finding users in erc-server-PRIVMSG

* lisp/erc/erc-backend.el (erc-server-PRIVMSG): Call new hook
`erc--user-from-nick-function' for turning the sender's nick into a
channel user, if any.
* lisp/erc/erc-button.el (erc-button--add-phantom-speaker): Redo
completely using simplified API.
(erc-button--fallback-user-function): Add internal function-interface
variable for finding an `erc-server-user' object when the usual places
disappoint.
(erc-button--get-phantom-user): Add new function, a getter for
`erc-button--phantom-users'.
(erc-button--phantom-users-mode): Replace advice subscription for
`erc-button--modify-nick-function' with one for
`erc-button--user-from-nick-function' and one for
`erc-button--fallback-user-function'.
(erc-button--get-user-from-speaker-naive): Remove unused function.
(erc-button--add-nickname-buttons): Call
`erc-button--fallback-user-function' when a user can't be found in
`erc-server-users' or `erc-channel-users'.
* lisp/erc/erc.el (erc--user-from-nick-function): New
function-interface variable for determining an `erc-server-user'
`erc-channel-user' pair from the sender's nick.
(erc--examine-nick): Add new function to serve as default value for
`erc--user-from-nick-function'.  (Bug#60933)
lisp/erc/erc-backend.el
lisp/erc/erc-button.el
lisp/erc/erc.el