1 ;; -*- mode: emacs-lisp; coding: utf-8; fill-column: 78; no-byte-compile: t; -*- |
1 ;; -*- mode: emacs-lisp; coding: utf-8; fill-column: 78; no-byte-compile: t; -*- |
2 |
2 |
3 (defvar my-usr-lisp-dir |
3 (defvar my-lisp-usr-home-dir |
4 (expand-file-name "~/usr/share/emacs/site-lisp") |
4 (expand-file-name "~/usr/share/emacs/site-lisp") |
5 "Here live additional lisp packages.") |
5 "There is a place for additional lisp packages installed via 'DIST=~/usr make install'.") |
6 |
6 |
7 (defvar my-lisp-dir |
7 (defvar my-lisp-dir |
8 (expand-file-name (concat user-emacs-directory "mylisp/")) |
8 (expand-file-name (concat user-emacs-directory "mylisp/")) |
9 "Here live my lisp packages.") |
9 "Here live my lisp packages.") |
10 (add-to-list 'load-path my-lisp-dir) |
10 (add-to-list 'load-path my-lisp-dir) |
26 (setq custom-file (concat user-emacs-directory ".emacs-custom")) |
26 (setq custom-file (concat user-emacs-directory ".emacs-custom")) |
27 (setq save-place-file (concat user-emacs-directory ".emacs-places")) |
27 (setq save-place-file (concat user-emacs-directory ".emacs-places")) |
28 (setq bookmark-default-file (concat user-emacs-directory "bookmarks")) |
28 (setq bookmark-default-file (concat user-emacs-directory "bookmarks")) |
29 (setq ido-save-directory-list-file (concat user-emacs-directory ".ido.last")) |
29 (setq ido-save-directory-list-file (concat user-emacs-directory ".ido.last")) |
30 |
30 |
31 (defun my-load--load-all () |
31 (defun my-lisp--load-pre () |
|
32 (mapc (lambda (f) |
|
33 (when (file-exists-p f) |
|
34 (load f nil nil t))) |
|
35 (list custom-file my-lisp-autogen my-lisp-auth my-lisp-pre my-lisp-autoload))) |
|
36 |
|
37 (defun my-lisp--load-usr-home () |
|
38 "Add hierarchy `my-lisp-usr-home-dir' to `load-path'." |
|
39 (when (file-directory-p my-lisp-usr-home-dir) |
|
40 (add-to-list 'load-path my-lisp-usr-home-dir) |
|
41 (let ((default-directory my-lisp-usr-home-dir)) |
|
42 (normal-top-level-add-subdirs-to-load-path)))) |
|
43 |
|
44 (defun my-lisp--load-all () |
32 "Load everything to help during byte compilation to spot errors |
45 "Load everything to help during byte compilation to spot errors |
33 better. Not for regular use but for the Makefile." |
46 better. Not for regular use but for the Makefile." |
34 (if (file-exists-p my-lisp-pre) |
47 (my-lisp--load-usr-home) |
35 (load my-lisp-pre) |
48 (my-lisp--load-pre)) |
36 (load ".emacs-pre")) |
|
37 (when (file-directory-p my-usr-lisp-dir) |
|
38 (add-to-list 'load-path my-usr-lisp-dir) |
|
39 (let ((default-directory my-usr-lisp-dir)) |
|
40 (normal-top-level-add-subdirs-to-load-path)))) |
|
41 |
49 |
42 (defmacro my--eval-after-load (feature &rest forms) |
50 (defmacro my--eval-after-load (feature &rest forms) |
43 (declare (indent defun)) |
51 (declare (indent defun)) |
44 `(,(if (or (not (boundp 'byte-compile-current-file)) |
52 `(,(if (or (not (boundp 'byte-compile-current-file)) |
45 (not byte-compile-current-file) |
53 (not byte-compile-current-file) |