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
commitd2b4c38e7e60cc0777642a61f94f0e5f550dbbdc (patch)
treef54e66b70914ca2822ba3cf4ed90e8caf2c7bcdc
parentb5ee20da1513f939dad9950c2c36f6af615a236a (diff)
downloaddotemacs-d2b4c38e7e60cc0777642a61f94f0e5f550dbbdc.tar.gz
dotemacs-d2b4c38e7e60cc0777642a61f94f0e5f550dbbdc.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 d6999ac0..2529fccb 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" \