]> git.eshelyaron.com Git - emacs.git/commit
Use advertised PREFIX when formatting nicks in ERC
authorF. Jason Park <jp@neverwas.me>
Fri, 29 Dec 2023 04:20:55 +0000 (20:20 -0800)
committerEshel Yaron <me@eshelyaron.com>
Tue, 2 Jan 2024 07:58:17 +0000 (08:58 +0100)
commit692d6396d1efb8d9a1dded524c53d8343dcd70cb
treee4f4ee8cd528cd57cc1e5f6f5b52c2657a9aa656
parent988ce027e0cd1e36a6ba6d8e1816fa279e503ea5
Use advertised PREFIX when formatting nicks in ERC

* lisp/erc/erc-speedbar.el (erc-speedbar-insert-user): Run
`erc-get-channel-membership-prefix' in associated buffer if possible.
* lisp/erc/erc.el (erc-get-channel-membership-prefix): Use known
prefix mappings when determining status chars.
* test/lisp/erc/erc-tests.el (erc--parsed-prefix): Use common helpers
for initializing buffers, and use a more realistic example for PREFIX
value.
(erc--update-channel-modes): Add current buffer to `erc-server-user'
object to maintain essential invariant, even though this doesn't
affect the test's outcome.
(erc-tests--equal-including-properties): Move to `erc-tests-common'
and rename `erc-tests-common-equal-with-props'.
(erc--merge-prop, erc--remove-from-prop-value-list,
erc--remove-from-prop-value-list/many): Use new name for
`erc-tests-common-equal-with-props'.
(erc-get-channel-membership-prefix): New test.
(erc--determine-speaker-message-format-args,
erc--determine-speaker-message-format-args/queries-as-channel,
erc--determine-speaker-message-format-args/queries): Use new name
for `erc-tests-common-equal-with-props'.
* test/lisp/erc/resources/erc-tests-common.el
(erc-tests-common-equal-with-props): New macro, originally
`erc-tests--equal-including-properties' from erc-tests.el.
(erc-tests-common-make-server-buf): Initialize tables and make NAME
argument optional.  (Bug#67677)

(cherry picked from commit 4939f4139391c13c34387ac0c05a5c7db39bf9d5)
lisp/erc/erc-speedbar.el
lisp/erc/erc.el
test/lisp/erc/erc-tests.el
test/lisp/erc/resources/erc-tests-common.el