summaryrefslogtreecommitdiff
path: root/tests/test-coverage-core--command.el
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-05-03 20:10:40 -0500
committerCraig Jennings <c@cjennings.net>2026-05-03 20:10:40 -0500
commit8a84af335cbef21a886117a7b0c16135351743bd (patch)
tree23770d00ae45c60ac84d4f8dfc66d26f07c6c8a9 /tests/test-coverage-core--command.el
parentabb975ddd4bdf0d362261bc5bcbf27114c90f4e6 (diff)
downloaddotemacs-8a84af335cbef21a886117a7b0c16135351743bd.tar.gz
dotemacs-8a84af335cbef21a886117a7b0c16135351743bd.zip
fix: use buffer-file-name for C single-file compile command
The fallback compile command in `cj/c-compile-command` was building paths from `(buffer-name)`. That broke for renamed buffers, uniquified names like `foo.c<2>`, and files outside `default-directory`. The buffer name is a display label, not a path, so `gcc -o name name` would compile (or fail to compile) the wrong target whenever the two diverged. I extracted `cj/c--single-file-compile-command` that takes the source path explicitly, shell-quotes both source and output paths, and signals a clear `user-error` for non-file buffers. The fallback now passes `buffer-file-name` instead of `(buffer-name)`. Tests for this helper landed in commit abb975d alongside other prog-c coverage work.
Diffstat (limited to 'tests/test-coverage-core--command.el')
0 files changed, 0 insertions, 0 deletions