mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
Allow setting `erc-split-line-length' to zero
* etc/ERC-NEWS: Mention that `erc-flood-protect' no longer affects line splitting. * lisp/erc/erc-backend.el (erc-split-line-length): Mention ways for modules to suppress line splitting entirely. (erc--split-line): Exit loop instead of asserting progress has been made. * lisp/erc/erc.el (erc--split-lines): Don't split input when option `erc-split-line-length' is zero. * test/lisp/erc/erc-tests.el (erc--split-line): Assert behavior when `erc-split-line-length' is 0. (Bug#62947)
This commit is contained in:
parent
fad2d1e2ac
commit
d6f9379d1c
4 changed files with 21 additions and 3 deletions
|
|
@ -1298,6 +1298,14 @@
|
|||
(should-not erc-debug-irc-protocol)))
|
||||
|
||||
(ert-deftest erc--split-line ()
|
||||
(let ((erc-split-line-length 0))
|
||||
(should (equal (erc--split-line "") '("")))
|
||||
(should (equal (erc--split-line " ") '(" ")))
|
||||
(should (equal (erc--split-line "1") '("1")))
|
||||
(should (equal (erc--split-line " 1") '(" 1")))
|
||||
(should (equal (erc--split-line "1 ") '("1 ")))
|
||||
(should (equal (erc--split-line "abc") '("abc"))))
|
||||
|
||||
(let ((erc-default-recipients '("#chan"))
|
||||
(erc-split-line-length 10))
|
||||
(should (equal (erc--split-line "") '("")))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue