]> git.eshelyaron.com Git - emacs.git/commit
Add merged-message indicator option for erc-fill-wrap
authorF. Jason Park <jp@neverwas.me>
Mon, 20 Nov 2023 01:18:29 +0000 (17:18 -0800)
committerF. Jason Park <jp@neverwas.me>
Fri, 24 Nov 2023 21:38:52 +0000 (13:38 -0800)
commit7cbe6ae7124cade32bce1268212e2279dcb6df20
tree409b74a528f1505b0d3bc5a69fc7d39604ce4483
parent8bb68a522f3aad104b68ca4e479f4ccc3fc6cb03
Add merged-message indicator option for erc-fill-wrap

* lisp/erc/erc-fill.el (erc-fill): Use `when-let' instead of
`when-let*'.
(erc-fill-wrap-merge): Mention companion options in doc string.
(erc-fill-wrap-merge-indicator): New option to display a
distinguishing "indicator" in the form of a one-character string
between messages from the same speaker.
(erc-fill-wrap-mode, erc-fill-wrap-disable): Mention
`erc-fill-wrap-merge-indicator' in doc string and kill related local
variables.
(erc-fill--wrap-merge-indicator-pre,
erc-fill--wrap-merge-indicator-post): New internal variables for
caching merge indicator.
(erc-fill--wrap-insert-merged-post, erc-fill--wrap-insert-merged-pre):
New functions for adding merge indicators either before or after a
message.
(erc-fill-wrap): Add logic for deferring to merge-indicator helpers
when needed.
* test/lisp/erc/erc-fill-tests.el (erc-fill-wrap-tests--merge-action,
erc-fill-wrap--merge-action): Move body of latter test into former, a
new fixture function.
(erc-fill-wrap--merge-action/indicator-pre,
erc-fill-wrap--merge-action/indicator-post): New tests.
* test/lisp/erc/resources/fill/snapshots/merge-wrap-indicator-post-01.eld:
New test data file.
* test/lisp/erc/resources/fill/snapshots/merge-wrap-indicator-pre-01.eld:
New test data file.  (Bug#60936)
lisp/erc/erc-fill.el
test/lisp/erc/erc-fill-tests.el
test/lisp/erc/resources/fill/snapshots/merge-wrap-indicator-post-01.eld [new file with mode: 0644]
test/lisp/erc/resources/fill/snapshots/merge-wrap-indicator-pre-01.eld [new file with mode: 0644]