summaryrefslogtreecommitdiff
path: root/modules/selection-framework.el
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-05-24 07:26:20 -0500
committerCraig Jennings <c@cjennings.net>2026-05-24 07:26:20 -0500
commit133d010f7d3d2a98976067024850a621c2429519 (patch)
tree1d71ba0630aab04ccf5d3b21977c745004ef5345 /modules/selection-framework.el
parent81055c34c13bfc1aba2ad4f651d325a23688e135 (diff)
downloaddotemacs-133d010f7d3d2a98976067024850a621c2429519.tar.gz
dotemacs-133d010f7d3d2a98976067024850a621c2429519.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/selection-framework.el')
0 files changed, 0 insertions, 0 deletions