aboutsummaryrefslogtreecommitdiff
path: root/modules/prog-webdev.el
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-05-10 13:41:27 -0500
committerCraig Jennings <c@cjennings.net>2026-05-10 13:41:27 -0500
commit76f58b4fbc1f182293f92485ee0f7b97080037ad (patch)
tree31a3ceccf5cb58739dc62fa27135db78f42ccc2b /modules/prog-webdev.el
parent7fd96c80de602b7ddfbc72f67fbd65f80df4bd9e (diff)
downloaddotemacs-76f58b4fbc1f182293f92485ee0f7b97080037ad.tar.gz
dotemacs-76f58b4fbc1f182293f92485ee0f7b97080037ad.zip
refactor(dirvish): extract cj/--ediff-pair-from-files; fix 0-files crash
`cj/dired-ediff-files' had its pair-determination logic inline: count check, prompt fallback when only one file was marked, and the older-first ordering for `ediff-files'. Lift it into `cj/--ediff-pair-from-files' -- pure given the file list, an injected prompt thunk, and a newer-than-p comparator -- so tests stay independent of mtimes and the dired prompt. While extracting, surface a latent bug: with zero marked files the original code fell through to `(file-newer-than-file-p nil nil)' and crashed with a wrong-type-argument error. Replace the crash with a clear `user-error' ("No files marked"), and add a regression test. The 3+ files case keeps its existing user-error message. Five Normal/Boundary/Error tests cover both ordering directions, the one-file prompt path, and both error counts.
Diffstat (limited to 'modules/prog-webdev.el')
0 files changed, 0 insertions, 0 deletions