summaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorF. Jason Park <jp@neverwas.me>2023-04-15 09:52:05 -0700
committerF. Jason Park <jp@neverwas.me>2023-05-05 17:18:01 -0700
commit5adda2f4683fe23efd659fc7418044c8230772c5 (patch)
tree4c2e3ebc7fd83628da56b6341ed303833239cef6 /etc
parent35dd1ade7f1e583f736e6f707343402fe868daec (diff)
downloademacs-5adda2f4683fe23efd659fc7418044c8230772c5.tar.gz
Revise FORM-as-function interface in erc-button-alist
* lisp/erc/erc-button.el (erc-button-alist): Remove redundant "<URL: foo>" entry, which adds nothing beyond highlighting the surrounding bookends at the expense of doubling up on face properties for no reason. Revise the FORM-as-function interface by removing the dynamic binding of face options and treating all implementers as replacements for `erc-button-add-button'. (erc-button--maybe-warn-arbitrary-sexp): Make more robust by having it handle all accepted FORM types other than booleans. (erc-button-add-buttons-1): Rework to only check FORM field once. (erc-button--substitute-command-keys-in-region, erc-button--display-error-with-buttons): Rename former as latter and change signature to conform to new `erc-button-add-buttons' interface. (erc-button--display-error-notice-with-keys): Call renamed helper. * test/lisp/erc/erc-button-tests.el (erc-button-alist--url, erc-button-tests--form, erc-button-tests--some-var, erc-button-tests--erc-button-alist--function-as-form, erc-button-alist--function-as-form, erc-button-tests--erc-button-alist--nil-form, erc-button-alist---nil-form): Add tests and helpers. (Bug#60933)
Diffstat (limited to 'etc')
-rw-r--r--etc/ERC-NEWS3
1 files changed, 2 insertions, 1 deletions
diff --git a/etc/ERC-NEWS b/etc/ERC-NEWS
index 3907b7bc5f2..f2a8eb72b95 100644
--- a/etc/ERC-NEWS
+++ b/etc/ERC-NEWS
@@ -209,7 +209,8 @@ changes are encouraged to voice their concerns on the bug list.
Two helper macros from GNU ELPA's Compat library are now available to
third-party modules as 'erc-compat-call' and 'erc-compat-function'.
In the area of buttons, 'Info-goto-node' has been supplanted by plain
-old 'info' in 'erc-button-alist', primarily for autoloading purposes.
+old 'info' in 'erc-button-alist', and the bracketed "<URL:...>"
+pattern entry has been removed because it was more or less redundant.
And the "TAB" key is now bound to a new command, 'erc-tab', that only
calls 'completion-at-point' when point is in the input area and
module-specific commands, like 'erc-button-next', otherwise.