summaryrefslogtreecommitdiff
path: root/lisp/erc/erc-track.el
diff options
context:
space:
mode:
authorF. Jason Park <jp@neverwas.me>2021-10-20 03:52:18 -0700
committerF. Jason Park <jp@neverwas.me>2022-06-30 15:03:26 -0700
commite958a2b726fdcb5a4f58169e6f4f384f5786f86a (patch)
treefa3e5b3971ea799432080b3a4eaf51905a3d0e00 /lisp/erc/erc-track.el
parent529e46f1287ddb6fc16779a3f14016d0c305037c (diff)
downloademacs-e958a2b726fdcb5a4f58169e6f4f384f5786f86a.tar.gz
Discourage ill-defined use of buffer targets in ERC
* lisp/erc/erc.el (erc-default-recipients, erc-default-target): Explain that the variable has fallen out of favor and that the function may have been used historically by third-party code for detecting channel subscription status, even though that's never been the case internally since at least the adoption of version control. Recommend newer alternatives. (erc--current-buffer-joined-p): Add possibly temporary predicate for detecting whether a buffer's target is a joined channel. The existing means are inconsistent, as discussed in bug#48598. The mere fact that they are disparate is unfriendly to new contributors. For example, in the function `erc-autojoin-channels', the `process-status' of the `erc-server-process' is used to detect whether a buffer needs joining. That's fine in that specific situation, but it won't work elsewhere. And neither will checking whether `erc-default-target' is nil, so long as `erc-delete-default-channel' and friends remain in play. (erc-add-default-channel, erc-delete-default-channel, erc-add-query, erc-delete-query): Deprecate these helpers, which rely on an unused usage variant of `erc-default-recipients'. * lisp/erc/erc-services.el: remove stray `erc-default-recipients' declaration. * lisp/erc/erc-backend.el (erc-server-NICK, erc-server-JOIN, erc-server-KICK, erc-server-PART): wrap deprecated helpers to suppress warnings. * lisp/erc/erc-join.el (erc-autojoin-channels): Use helper to detect whether a buffer needs joining. Prefer this to server liveliness, as explained above.
Diffstat (limited to 'lisp/erc/erc-track.el')
-rw-r--r--lisp/erc/erc-track.el2
1 files changed, 0 insertions, 2 deletions
diff --git a/lisp/erc/erc-track.el b/lisp/erc/erc-track.el
index 9118d7b994f..e8117f9a89b 100644
--- a/lisp/erc/erc-track.el
+++ b/lisp/erc/erc-track.el
@@ -353,8 +353,6 @@ of `erc-track-shorten-start' characters."
(> (length s) erc-track-shorten-cutoff))
erc-track-shorten-start))
-(defvar erc-default-recipients)
-
(defun erc-all-buffer-names ()
"Return all channel or query buffer names.
Note that we cannot use `erc-channel-list' with a nil argument,