diff options
| author | Craig Jennings <c@cjennings.net> | 2026-05-24 07:26:20 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-05-24 07:26:20 -0500 |
| commit | 7f916e971b3cebbe1ea53e399e2870b81666cb84 (patch) | |
| tree | 03e340469199fd612b1241122a34fced8f88fb6f /modules/coverage-core.el | |
| parent | 1b8203988d817fa5bc4fde76c364c34b2dd1476c (diff) | |
| download | dotemacs-7f916e971b3cebbe1ea53e399e2870b81666cb84.tar.gz dotemacs-7f916e971b3cebbe1ea53e399e2870b81666cb84.zip | |
refactor(text-enclose): extract shared region-or-buffer bounds helper
The append/prepend/indent/dedent *-in-region-or-buffer commands each inlined the same (if (use-region-p) (region-beginning) (point-min)) / (region-end)/(point-max) block — four copies of the "operate on the region, else the whole buffer" contract. Extracted cj/--region-or-buffer-bounds as the single source of that decision and routed all four through it. Behavior is unchanged; the public-wrapper tests still pass.
This was the "extract a shared helper that decides the target range" option from the reconcile task. The sibling custom-ordering.el helpers (cj/--arrayify, cj/--unarrayify) already document an explicit (start end) contract accurately and are region-required by design, so they needed no docstring change — each pair now has one clear, consistent contract. Tests cover the helper for the region case, the no-region whole-buffer case, and an empty buffer.
Diffstat (limited to 'modules/coverage-core.el')
0 files changed, 0 insertions, 0 deletions
