summaryrefslogtreecommitdiff
path: root/test/lisp/emacs-lisp/lisp-mnt-tests.el
diff options
context:
space:
mode:
authorF. Jason Park <jp@neverwas.me>2023-04-30 07:12:56 -0700
committerF. Jason Park <jp@neverwas.me>2023-05-05 17:18:01 -0700
commit35dd1ade7f1e583f736e6f707343402fe868daec (patch)
treebc1a0022b297fd89c0acea30172e95ed5a9f0f98 /test/lisp/emacs-lisp/lisp-mnt-tests.el
parent3a5a6fce957468be5ef0a8ac76fec8507c3e4e99 (diff)
downloademacs-35dd1ade7f1e583f736e6f707343402fe868daec.tar.gz
emacs-35dd1ade7f1e583f736e6f707343402fe868daec.tar.bz2
emacs-35dd1ade7f1e583f736e6f707343402fe868daec.zip
Preprocess prompt input linewise in ERC
* etc/ERC-NEWS: Mention revised role of `erc-pre-send-functions' relative to line splitting. * lisp/erc/erc-common.el (erc-input): Add new slot `refoldp' to allow `erc-pre-send-functions' members to indicate that splitting should occur a second time after all members have had their say. (erc--input-split): Specify some defaults for overridden slots and explicitly declare some types for good measure. * lisp/erc/erc-goodies.el (erc-noncommands-mode, erc-noncommands-enable, erc-noncommands-disable): Replace `erc-pre-send-functions' with `erc--input-review-functions'. * lisp/erc/erc-ring.el (erc-ring-enable, erc-ring-disable, erc-ring-mode): Subscribe to `erc--input-review-functions' instead of `erc-pre-send-functions' for `erc--add-to-input-ring'. * lisp/erc/erc.el (erc-pre-send-functions): Note some nuances regarding line splitting in doc string and note that a new slot is available. (erc--pre-send-split-functions, erc--input-review-functions): Rename former to latter, while also obsoleting. Remove large comment. Add new default member `erc--run-input-validation-checks'. (erc-send-modify-hook): Replace the obsolete `erc-send-pre-hook' and `erc-send-this' with `erc-pre-send-functions' in doc string. (erc--check-prompt-input-for-excess-lines): Don't trim trailing blanks. Rework to also report overages in characters as well as lines. (erc--run-input-validation-hooks): New function to adapt an `erc--input-split' object to `erc--check-prompt-input-functions'. (erc-send-current-line): Run `erc--input-review-functions' in place of the validation hooks they've subsumed. Call `erc--send-input-lines' instead of the now retired but not deprecated `erc-send-input'. (erc--run-send-hooks, erc--send-input-lines): New functions that together form an alternate version of `erc-send-input'. They operate on input linewise but make accommodations for older interfaces. * test/lisp/erc/erc-tests.el (erc-ring-previous-command): Replace `erc-pre-send-functions' with `erc--input-review-functions'. (erc-tests--with-process-input-spy): Shadow `erc--input-review-functions'. (erc-check-prompt-input-for-excess-lines): Don't expect trailing blanks to be trimmed. (erc--run-send-hooks): New test. (Bug#62947)
Diffstat (limited to 'test/lisp/emacs-lisp/lisp-mnt-tests.el')
0 files changed, 0 insertions, 0 deletions