]> git.eshelyaron.com Git - emacs.git/commit
Deprecate nicknames entry in erc-button-alist
authorF. Jason Park <jp@neverwas.me>
Fri, 2 Jun 2023 05:07:03 +0000 (22:07 -0700)
committerF. Jason Park <jp@neverwas.me>
Mon, 12 Jun 2023 02:18:14 +0000 (19:18 -0700)
commit67f7ac2bbee2f58d919232682f6ea9e7039eb5f3
treef18940773162a6e8d6b51584b1425e1221b734d3
parentbd969326e96584249b6c140d972f7b27ab3274f6
Deprecate nicknames entry in erc-button-alist

* lisp/erc/erc-button.el (erc-button-mode, erc-button-enable,
erc-button-disable): Restore running `erc-button-setup' on
`erc-mode-hook' and also do so immediately in all ERC buffers.
Do this instead of calling `erc-button--check-nicknames-entry.
(erc-button-buttonize-nicks): Mention that this option's value must be
non-nil for all but the most basic client functionality.
(erc-button-alist): Remove `nicknames' entry entirely.  Describe
deprecation, replacement behavior, and available escape hatches in doc
string.  Update and improve custom type definition, in particular, by
including long supported but never mentioned variants for the "REGEXP"
field.
(erc-button-keys-added): Deprecate because unused and misleading: keys
are bound during module init and remain so while module is enabled.
(erc-button--has-nickname-entry): New variable to indicate whether to
follow legacy code path when a `nicknames' entry exists in
`erc-button-alist'.
(erc-button-setup): Rewrite to provide warnings about deprecated
values for `erc-button-alist'.
(erc-button-nickname-callback-function): Add escape hatch for those
needing a custom callback for what was the default `nickname' entry in
`erc-button-alist'.
(erc-button-add-buttons): Always run `erc-button-add-nickname-buttons'
unless `erc-button--has-nickname-entry' is non-nil.
(erc-button--maybe-warn-arbitrary-sexp, erc-button--extract-form):
Rename former to latter and abstain from emitting a warning.
(erc-button--check-nicknames-entry): Remove unused function.
(erc-button-add-nickname-buttons): Defer to `erc-button--extract-form'
for determining value of third FORM slot of entry.
(erc-button-add-buttons-1): Call renamed version of
`erc-button--maybe-warn-arbitrary-sexp'.  (Bug#60933)
lisp/erc/erc-button.el