aboutsummaryrefslogtreecommitdiff
path: root/modules/external-open.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
commitf3d50d1b2aea4f1eda436c54a15cc18596f2df0b (patch)
treea74107a9d1988589b4b960b949486f8add363cfa /modules/external-open.el
parentf619cbf9f384dfd6976e3bed448b3473146841e1 (diff)
downloaddotemacs-f3d50d1b2aea4f1eda436c54a15cc18596f2df0b.tar.gz
dotemacs-f3d50d1b2aea4f1eda436c54a15cc18596f2df0b.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 f619cbf alongside other prog-c coverage work.
Diffstat (limited to 'modules/external-open.el')
0 files changed, 0 insertions, 0 deletions