aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-06-12 18:15:35 -0500
committerCraig Jennings <c@cjennings.net>2026-06-12 18:15:35 -0500
commitc2c266cd390ab3dd9f218b26a6455415e2271ed9 (patch)
tree51dfd758afc74fdd0c493bc07016fbd1d32b3403
parent72b7dad1a1a2af8f7aa73c4c95d7843dc825bb59 (diff)
downloaddotemacs-c2c266cd390ab3dd9f218b26a6455415e2271ed9.tar.gz
dotemacs-c2c266cd390ab3dd9f218b26a6455415e2271ed9.zip
fix(hooks): add edited file's dirs to byte-compile load-path for cross-project .el
-rwxr-xr-x.claude/hooks/validate-el.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/.claude/hooks/validate-el.sh b/.claude/hooks/validate-el.sh
index d6999ac01..2529fccb8 100755
--- a/.claude/hooks/validate-el.sh
+++ b/.claude/hooks/validate-el.sh
@@ -51,7 +51,12 @@ case "$f" in
fi
;;
*.el)
+ # -L the file's own directory (and a sibling project root for files
+ # under a tests/ subdir) so cross-project edits compile against their
+ # own modules, not just this project's.
if ! output="$(emacs --batch --no-site-file --no-site-lisp \
+ -L "$(dirname "$f")" \
+ -L "$(dirname "$f")/.." \
-L "$PROJECT_ROOT" \
-L "$PROJECT_ROOT/modules" \
-L "$PROJECT_ROOT/tests" \