; Make erc--send-input-lines a normal function again

* lisp/erc/erc.el (erc--send-input-lines): Revert portion of
174b3dd9bd "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 inadvertently allow overloading of `insertp' because user code
can legitimately set that to a function, which we then blindly call.
Instead, hard-code it to the only expected alternate display function.
This commit is contained in:
F. Jason Park 2024-01-01 00:34:53 -08:00
parent 94f760163e
commit 74f022b279

View file

@ -7878,12 +7878,13 @@ queue. Expect LINES-OBJ to be an `erc--input-split' object."
(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))
(if (eq (erc--input-split-insertp lines-obj)
'erc--command-indicator-display)
(funcall (erc--input-split-insertp lines-obj) line)
(erc-display-msg line)))
(erc-process-input-line (concat line "\n")