]> git.eshelyaron.com Git - emacs.git/commit
Don't set erc-server-announced-name unless known
authorF. Jason Park <jp@neverwas.me>
Tue, 15 Jun 2021 06:40:45 +0000 (23:40 -0700)
committerF. Jason Park <jp@neverwas.me>
Thu, 30 Jun 2022 22:03:26 +0000 (15:03 -0700)
commitde53d18a4d81e8b49d1dfecaf5481382a0ad8d08
treebbc557e6a8dd364087c492c1b7972461841a6290
parent873499ce065144682852643b7d0e04cd45f7eac3
Don't set erc-server-announced-name unless known

* lisp/erc/erc.el (erc-open): whenever this function is called, the
variable `erc-server-announced-name' may be set locally in the calling
server buffer.  However, if that buffer's dialed server matches that
of the one being created, the announced name is copied over on faith.
But there's no guarantee that the name will match the one ultimately
emitted by the server during its introductory burst.  Beyond
potentially causing confusion in protocol logs, this behavior may
complicate debugging efforts.  Setting the variable to nil helps
ensure a consistent environment when preparing a buffer for all newly
dialed connections.  This commit also simplifies the setting of
`erc-server-connected', which is always nil when connecting and
vice-versa.
lisp/erc/erc.el