From abc5a18c96617c5040f2ffd2e286befec75c4e0f Mon Sep 17 00:00:00 2001 From: "F. Jason Park" Date: Mon, 1 Jan 2024 00:34:53 -0800 Subject: [PATCH 1/2] [5.6] Make erc--send-input-lines a normal function * lisp/erc/erc.el (erc--send-input-lines): Revert portion of 174b3dd9bd78c662ce9fff78404dcfa02259d21b "Make nested input handling more robust in ERC" that converted this from a function to a method. Instead, defer change until it's needed, likely for bug#49860. Also, don't overload `insertp' because user code can legitimately set that to a function, which we then blindly call. --- lisp/erc/erc.el | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el index 5b3d0d66941..b4f31a361c4 100644 --- a/lisp/erc/erc.el +++ b/lisp/erc/erc.el @@ -7878,14 +7878,12 @@ erc--run-send-hooks (user-error "Multiline command detected" )) lines-obj) -(cl-defmethod erc--send-input-lines (lines-obj) +(defun erc--send-input-lines (lines-obj) "Send lines in `erc--input-split-lines' object LINES-OBJ." (when (erc--input-split-sendp lines-obj) (dolist (line (erc--input-split-lines lines-obj)) (when (erc--input-split-insertp lines-obj) - (if (functionp (erc--input-split-insertp lines-obj)) - (funcall (erc--input-split-insertp lines-obj) line) - (erc-display-msg line))) + (erc-display-msg line)) (erc-process-input-line (concat line "\n") (null erc-flood-protect) (not (erc--input-split-cmdp lines-obj)))))) -- 2.42.0