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 | 976f9c34790f6365412c2960ebc88ef2635a88e1 (patch) | |
| tree | 7f2eb340dce126474fa04b7a4910664112751679 /docs/design | |
| parent | 870f6ef1fcb29d564a446fabb16d21ec725d8cfb (diff) | |
| download | dotemacs-976f9c34790f6365412c2960ebc88ef2635a88e1.tar.gz dotemacs-976f9c34790f6365412c2960ebc88ef2635a88e1.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/design')
0 files changed, 0 insertions, 0 deletions
