diff options
| author | Craig Jennings <c@cjennings.net> | 2026-05-10 13:44:40 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-05-10 13:44:40 -0500 |
| commit | 3a44f704b00c51687242672a063131efe0a7cbbc (patch) | |
| tree | 7643021bf9b1b3fb58e0585ce00744144a7b2831 /docs | |
| parent | 1d632526039271de5b6687cce8ed449914c84471 (diff) | |
| download | dotemacs-3a44f704b00c51687242672a063131efe0a7cbbc.tar.gz dotemacs-3a44f704b00c51687242672a063131efe0a7cbbc.zip | |
refactor(dirvish): extract cj/--dired-line-is-directory-p
`cj/dired-mark-all-visible-files' classified the current line as a directory via `(looking-at "^. d")' inline. Lift the classification into `cj/--dired-line-is-directory-p', a string predicate that takes a line and returns non-nil when it's a directory listing. The wrapper still walks the dired buffer line by line and calls `dired-mark' -- that iteration is dired-coupled and stays untested -- but the format-aware predicate is now isolated and verified.
Six Normal/Boundary tests cover unmarked directories, marked directories (`*' prefix), regular files (`-' instead of `d'), symlinks (`l'), empty lines, and dired header lines (` /path:' and ` total N').
Diffstat (limited to 'docs')
0 files changed, 0 insertions, 0 deletions
