Redo line splitting for outgoing messages in ERC
authorF. Jason Park <jp@neverwas.me>
Mon, 17 Apr 2023 07:01:15 +0000 (00:01 -0700)
committerF. Jason Park <jp@neverwas.me>
Sat, 6 May 2023 00:18:01 +0000 (17:18 -0700)
commit3a5a6fce957468be5ef0a8ac76fec8507c3e4e99
treeb51dca001d4de0382065b8dd5ffbaf651d15ae0b
parent16306567706c9621cef169d0e992b9b3b08a9d7e
Redo line splitting for outgoing messages in ERC

* lisp/erc/erc-backend.el (erc--reject-unbreakable-lines): New
variable, an escape hatch for somewhat regaining pre-5.6
line-splitting behavior.
(erc--split-line): New utility function that doesn't rely on
column-oriented filling.
* lisp/erc/erc.el (erc--pre-send-split-functions): Append
`erc--split-lines' to value.
(erc--split-lines): New function to re-split current selection of
lines.
(erc-send-input): Hard-code line preparation instead of calling
`erc--pre-send-split-functions', in order to bake in traditional
behavior before move to "pre-splitting".
* test/lisp/erc/erc-scenarios-base-split-line.el: New file.
* test/lisp/erc/erc-tests.el (erc--split-line): New test.
(erc-send-current-line): Don't expect a flood argument when
interpreting a command because it's not passed along to the command's
handler.  This was previously misleading because it assigned undue
significance to something that had no bearing on the fate of a
command.
* test/lisp/erc/resources/base/flood/ascii.eld: New file.
* test/lisp/erc/resources/base/flood/koi8-r.eld: New file.
* test/lisp/erc/resources/base/flood/utf-8.eld: New file.
* test/lisp/erc/resources/erc-d/erc-d.el: Don't decode input.
(Bug#62947)
lisp/erc/erc-backend.el
lisp/erc/erc.el
test/lisp/erc/erc-scenarios-base-split-line.el [new file with mode: 0644]
test/lisp/erc/erc-tests.el
test/lisp/erc/resources/base/flood/ascii.eld [new file with mode: 0644]
test/lisp/erc/resources/base/flood/koi8-r.eld [new file with mode: 0644]
test/lisp/erc/resources/base/flood/utf-8.eld [new file with mode: 0644]
test/lisp/erc/resources/erc-d/erc-d.el