aboutsummaryrefslogtreecommitdiff
path: root/modules/ui-theme.el
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-05-10 13:29:11 -0500
committerCraig Jennings <c@cjennings.net>2026-05-10 13:29:11 -0500
commit9688edf09086ae96559cf572b871b2cdb142c5be (patch)
treed238155d1c38e0d974c960e662dd921d32178345 /modules/ui-theme.el
parent2a9257006fcde777e217708b4593461a9e6c07a8 (diff)
downloaddotemacs-9688edf09086ae96559cf572b871b2cdb142c5be.tar.gz
dotemacs-9688edf09086ae96559cf572b871b2cdb142c5be.zip
refactor(dirvish): extract cj/--dired-resolve-display-path helper
`cj/dired-copy-path-as-kill' was a 57-line procedural body with the path-resolution branching mixed into the kill-ring write and the user-visible message. Lift the four-way decision (force-absolute / project-relative / home-relative / bare absolute) into `cj/--dired-resolve-display-path', a pure function from (FILE PROJECT-ROOT HOME-DIR FORCE-ABSOLUTE) to (PATH . PATH-TYPE). The wrapper now reads as: get the dired file, ask the helper how to display it, format-or-pass-through, kill-new, message. Seven Normal/Boundary tests cover each branch: project-relative, home-relative, the home-itself "~" glyph, absolute fallback, force-absolute beating both project and home, and project taking precedence over home when both apply.
Diffstat (limited to 'modules/ui-theme.el')
0 files changed, 0 insertions, 0 deletions