Hi Keita,
Ikumi Keita <[email protected]> writes:
> Very cofusing, but I at last found out why. Since this `requre' is a top
> level form, byte-compiler evaluates it, and `fila-name-directory' fails
> because `load-file-name' is nil :-(
Thanks for digging into this 🙏
> We should add something like this:
>
> diff --git a/GNUmakefile b/GNUmakefile
> index 01608188..3ef225e6 100644
> --- a/GNUmakefile
> +++ b/GNUmakefile
> @@ -46,7 +46,8 @@ ALL_GENERATED_FILES=$(MAIN_GENERATED_FILES) \
> # Generate & compile everything including the manuals below doc/.
> all: $(ALL_GENERATED_FILES) compile auctex-autoloads.el
>
> -compile: $(patsubst %.el,%.elc,$(wildcard *.el style/*.el)) tex-site.elc
> +COMPILE_ELC= $(filter-out auctex.elc, $(patsubst %.el,%.elc,$(wildcard *.el
> sty
> le/*.el)))
> +compile: $(COMPILE_ELC) tex-site.elc
>
> # If we were depending on emacs 29.1, we could simply use
> # loaddefs-generate...
This will prevent auctex.el from being byte-compiled, right? If so, we
could also probably take the other approach and do:
--8<---------------cut here---------------start------------->8---
diff --git a/auctex.el b/auctex.el
index 2f7af507..cd73f256 100644
--- a/auctex.el
+++ b/auctex.el
@@ -42,11 +42,13 @@
;; (require 'tex-site (expand-file-name "tex-site.el"
;; (file-name-directory load-file-name))
-(autoload 'TeX-load-hack
- (expand-file-name "tex-site.el"
- (file-name-directory load-file-name)))
-(TeX-load-hack)
-
+(require 'tex-site
+ (expand-file-name "tex-site.el"
+ (file-name-directory load-file-name)))
(provide 'auctex)
+;; Local Variables:
+;; no-byte-compile: t
+;; End:
+
;;; auctex.el ends here
--8<---------------cut here---------------end--------------->8---
which seems easier to me ("easier" is in the eye of beholder, of course
;-)
Best, Arash