--- a/.emacs-defs Sat Jan 02 18:36:39 2021 +0200
+++ b/.emacs-defs Sat Jan 02 18:57:24 2021 +0200
@@ -1,8 +1,8 @@
;; -*- mode: emacs-lisp; coding: utf-8; fill-column: 78; no-byte-compile: t; -*-
-(defvar my-usr-lisp-dir
+(defvar my-lisp-usr-home-dir
(expand-file-name "~/usr/share/emacs/site-lisp")
- "Here live additional lisp packages.")
+ "There is a place for additional lisp packages installed via 'DIST=~/usr make install'.")
(defvar my-lisp-dir
(expand-file-name (concat user-emacs-directory "mylisp/"))
@@ -28,16 +28,24 @@
(setq bookmark-default-file (concat user-emacs-directory "bookmarks"))
(setq ido-save-directory-list-file (concat user-emacs-directory ".ido.last"))
-(defun my-load--load-all ()
+(defun my-lisp--load-pre ()
+ (mapc (lambda (f)
+ (when (file-exists-p f)
+ (load f nil nil t)))
+ (list custom-file my-lisp-autogen my-lisp-auth my-lisp-pre my-lisp-autoload)))
+
+(defun my-lisp--load-usr-home ()
+ "Add hierarchy `my-lisp-usr-home-dir' to `load-path'."
+ (when (file-directory-p my-lisp-usr-home-dir)
+ (add-to-list 'load-path my-lisp-usr-home-dir)
+ (let ((default-directory my-lisp-usr-home-dir))
+ (normal-top-level-add-subdirs-to-load-path))))
+
+(defun my-lisp--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))
- (normal-top-level-add-subdirs-to-load-path))))
+ (my-lisp--load-usr-home)
+ (my-lisp--load-pre))
(defmacro my--eval-after-load (feature &rest forms)
(declare (indent defun))