Simplified Makefile byte compillation recipe by moving some logic from CLI to elisp.
--- a/.emacs-defs Sat Jan 02 01:26:59 2021 +0200
+++ b/.emacs-defs Sat Jan 02 01:28:36 2021 +0200
@@ -28,7 +28,12 @@
(setq bookmark-default-file (concat user-emacs-directory "bookmarks"))
(setq ido-save-directory-list-file (concat user-emacs-directory ".ido.last"))
-(defun my-load.add-my-loadpaths ()
+(defun my-load--load-all ()
+ "Load everything to help during byte compilation to spot errors
+better. Not for regular use but for the Makefile."
+ (if (file-exists-p my-lisp-pre)
+ (load my-lisp-pre)
+ (load ".emacs-pre"))
(when (file-directory-p my-usr-lisp-dir)
(add-to-list 'load-path my-usr-lisp-dir)
(let ((default-directory my-usr-lisp-dir))
--- a/Makefile Sat Jan 02 01:26:59 2021 +0200
+++ b/Makefile Sat Jan 02 01:28:36 2021 +0200
@@ -180,7 +180,7 @@
.PHONY: check-byte-compile-dot-emacs
check-byte-compile-dot-emacs:
- $(EMACS) --batch --load "$(curdir)/.emacs-defs" -f 'my-load.add-my-loadpaths' --load "$(emacsdir)/.emacs-pre" --eval='(byte-compile-file ".emacs-my")'
+ $(EMACS) --batch --load "$(curdir)/.emacs-defs" -f 'my-load--load-all' --eval='(byte-compile-file ".emacs-my")'
rm -f .emacs-my.elc
################################################################