Function: erc--check-prompt-input-for-excess-lines
erc--check-prompt-input-for-excess-lines is a byte-compiled function
defined in erc.el.gz.
Signature
(erc--check-prompt-input-for-excess-lines _ LINES)
Documentation
Return non-nil when trying to send too many LINES.
Source Code
;; Defined in /usr/src/emacs/lisp/erc/erc.el.gz
(defun erc--check-prompt-input-for-excess-lines (_ lines)
"Return non-nil when trying to send too many LINES."
(when erc-inhibit-multiline-input
;; Assume `erc--discard-trailing-multiline-nulls' is set to run
(let ((reversed (seq-drop-while #'string-empty-p (reverse lines)))
(max (if (eq erc-inhibit-multiline-input t)
2
erc-inhibit-multiline-input))
(seen 0)
msg)
(while (and (pop reversed) (< (cl-incf seen) max)))
(when (= seen max)
(setq msg (format "(exceeded by %d)" (1+ (length reversed))))
(unless (and erc-ask-about-multiline-input
(y-or-n-p (concat "Send input " msg "?")))
(concat "Too many lines " msg))))))