diff options
| author | Craig Jennings <c@cjennings.net> | 2026-05-10 13:27:51 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-05-10 13:27:51 -0500 |
| commit | 9ead5a6161596cdc29927f5f414b786b76745667 (patch) | |
| tree | 40b670f58c74ab1d5cd4c63687635f2b4b7d3169 /modules/custom-ordering.el | |
| parent | 873046581ec7b66e555997a98aa8a3cf07fee099 (diff) | |
| download | dotemacs-9ead5a6161596cdc29927f5f414b786b76745667.tar.gz dotemacs-9ead5a6161596cdc29927f5f414b786b76745667.zip | |
refactor(dirvish): extract cj/--duplicate-file-name helper
The name-mangling logic in `cj/dirvish-duplicate-file' was inline -- inseparable from the dired side effects (existence check, copy, revert). Extract to `cj/--duplicate-file-name', a pure function from FILE to FILE-WITH-COPY-SUFFIX. Seven Normal/Boundary tests cover the cases I care about: typical extension, elisp file, no extension, multi-dot extensions (only the last dot counts), leading-dot dotfiles, relative paths, spaces in the base name.
The wrapper retains the dired-mode interactive shape and now reads as a thin shell over the pure helper.
Diffstat (limited to 'modules/custom-ordering.el')
0 files changed, 0 insertions, 0 deletions
