From d83cc05a73645f23558590e0415ecb7d5ae2d02d Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Tue, 28 Apr 2020 20:22:50 +0300 Subject: [PATCH] Fix error in ERC when 'erc-server-coding-system' is customized * lisp/erc/erc-backend.el (erc-split-line): Handle the case where 'erc-coding-system-for-target' returns a coding-system's symbol. (Bug#40914) --- lisp/erc/erc-backend.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/erc/erc-backend.el b/lisp/erc/erc-backend.el index 0e3495e139a..526e854beca 100644 --- a/lisp/erc/erc-backend.el +++ b/lisp/erc/erc-backend.el @@ -466,7 +466,8 @@ If this is set to nil, never try to reconnect." The length is specified in `erc-split-line-length'. Currently this is called by `erc-send-input'." - (let ((charset (car (erc-coding-system-for-target nil)))) + (let* ((coding (erc-coding-system-for-target nil)) + (charset (if (consp coding) (car coding) coding))) (with-temp-buffer (insert longline) ;; The line lengths are in octets, not characters (because these -- 2.39.2