aboutsummaryrefslogtreecommitdiff
path: root/test-from-git
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-05-05 09:38:06 -0500
committerCraig Jennings <c@cjennings.net>2026-05-05 09:38:06 -0500
commit4a4294dbb0c6102d31925641fc93d47320dc75a0 (patch)
tree62778069d2851c24f3564b3c1bbc814a22205612 /test-from-git
parent4a16e9da8de558ce74eacab2bc72a2e38719b822 (diff)
downloadorg-drill-4a4294dbb0c6102d31925641fc93d47320dc75a0.tar.gz
org-drill-4a4294dbb0c6102d31925641fc93d47320dc75a0.zip
refactor: flatten nesting in org-drill-entries
The main loop body reached 7 levels of indentation in the success path: while > destructuring-bind > save-excursion > cond > t-clause > let > cond > inner-cond. Extracted two helpers: - org-drill--pick-next-marker: chooses between resuming the current-item slot and popping a fresh marker, returning a (marker . next-resuming-p) cons so the caller updates resuming-p in lock-step. - org-drill--route-rating-result: routes the rating result into the session's again/done queues and returns a symbol (quit/edit/ skip/next) telling the caller whether to break the loop. org-drill-entries shrinks from 54 lines to 19, and the deepest nesting drops from 7 levels to 4.
Diffstat (limited to 'test-from-git')
0 files changed, 0 insertions, 0 deletions