>> I use it with `emacs -Q ...` when I want to try and isolate a problem. > > Thanks for the hint. My approach to that for package `foo' until now > was: > > (progn > (package-initialize t) > (package-activate 'foo))
That works as well, indeed. There are many ways to skin this cat. 🙂 [ In my case, most packages are installed in a non-standard directory, so I'd first have to set `package-user-dir`, and also I find it less convenient to use `--eval` than `-l`. ] > By ugly I meant (load "loaddefs.el"). Ah, OK. Not sure why you find it ugly, but there's no accounting for taste. > • Get auctex-autoloads.el instead of loaddefs.el, and I think this is just a matter of changing the file name in GNUmakefile's `autoloads` target. > • Put the addition to `load-path' in that file, so the forms above > turn into (load "~/Repos/el/auctex/auctex-autoloads" nil t t) as > well? I think the patch below does that. Stefan
diff --git a/GNUmakefile b/GNUmakefile index b5cec4822e..fbf653ab09 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -17,7 +17,8 @@ # latex: prtightpage.def # latex: prtracingall.def -EMACS=emacs --batch -q -no-site-file -no-init-file -l lpath.el +EMACSBIN=emacs +EMACS=$(EMACSBIN) --batch -q -no-site-file -no-init-file -l lpath.el MAKEINFO=makeinfo INSTALL_INFO=install-info PERL=perl @@ -44,7 +45,11 @@ all: $(ALL_GENERATED_FILES) compile autoloads compile: $(patsubst %.el,%.elc,$(wildcard *.el style/*.el)) autoloads: - $(EMACS) -f loaddefs-generate-batch loaddefs.el . + $(EMACS) --eval \ + "(loaddefs-generate \".\" \"auctex-autoloads.el\" \ + nil \"(add-to-list 'load-path \ + (directory-file-name \ + (file-name-directory load-file-name)))\")" %.elc: %.el $(EMACS) -f batch-byte-compile $< @@ -74,18 +79,16 @@ README: doc/intro.texi doc/preview-readme.texi doc/macros.texi # Commands copied&adapted from autogen.sh and doc/Makefile.in. IGNORED:=$(shell rm -f ChangeLog && ./build-aux/gitlog-to-auctexlog && cat ChangeLog.1 >> ChangeLog) # Committer date of HEAD. -AUCTEXDATE:=$(shell git log -n1 --pretty=tformat:"%ci" \ - | sed -nre 's/ /_/p' | sed -nre 's/ .*//p') +AUCTEXDATE:=$(shell (git log -n1 --pretty=tformat:"%ci" 2>/dev/null \ + || date +"%Y-%m-%d %T") \ + | sed -re 's/ /_/' -e 's/ .*//') # Extract the version number from the diff line "+;; Version: 14.0.4" of # the commit HEAD which is only filled when we did a release in the last # commit. -THISVERSION:=$(shell git show HEAD -- auctex.el \ +THISVERSION:=$(shell git show HEAD -- auctex.el 2>/dev/null \ | sed -nre 's/[+];; Version: ([0-9]+.[0-9]+.[0-9]+)/\1/p') -# Extract the last version number from the previous change to auctex.el, -# i.e., only look at commits starting at HEAD~1. -LASTVERSION:=$(shell git log HEAD~1 -p --first-parent -- auctex.el \ - | grep "+;; Version: " \ - | sed -nre 's/[+];; Version: ([0-9]+.[0-9]+.[0-9]+)/\1/p;q') +# Extract the last released version number from `auctex.el`. +LASTVERSION:=$(shell sed -nre '/Version:/{s/;; Version: ([0-9]+.[0-9]+.[0-9]+)/\1/p;q}' auctex.el) AUCTEXVERSION:=$(if $(THISVERSION),$(THISVERSION),$(LASTVERSION).$(AUCTEXDATE)) tex-site.el: tex-site.el.in