From: Eli Zaretskii Date: Tue, 28 Apr 2020 17:22:50 +0000 (+0300) Subject: Fix error in ERC when 'erc-server-coding-system' is customized X-Git-Tag: emacs-27.1-rc1~174 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d83cc05a73645f23558590e0415ecb7d5ae2d02d;p=emacs.git 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) --- 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