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 | 084405c09032cb6e2d3af85d376d46da036b245e (patch) | |
| tree | 5a9e842b48396db2c34ba62a1ecd21fbbee7b323 /custom/eplot.el | |
| parent | 361e8835d3dcae2d75cfb860201c5801a9e4a085 (diff) | |
| download | dotemacs-084405c09032cb6e2d3af85d376d46da036b245e.tar.gz dotemacs-084405c09032cb6e2d3af85d376d46da036b245e.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 'custom/eplot.el')
0 files changed, 0 insertions, 0 deletions
