Move load-path manipulation to the beginning of the configuration
This commit is contained in:
parent
f97a40dcee
commit
885219a7ac
@ -1,3 +1,28 @@
|
||||
* Add some directories to ~load-path~
|
||||
|
||||
** My own (version controlled) ~lisp~ directory
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(add-to-list 'load-path (expand-file-name
|
||||
(convert-standard-filename "lisp/")
|
||||
user-emacs-directory))
|
||||
(add-to-list 'load-path (expand-file-name
|
||||
(convert-standard-filename "lisp/nyan-prompt")
|
||||
user-emacs-directory))
|
||||
#+END_SRC
|
||||
|
||||
** The local site-lisp
|
||||
|
||||
…if it exists.
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(let ((site-lisp-dir "/usr/local/share/emacs/site-lisp"))
|
||||
(when (file-directory-p site-lisp-dir)
|
||||
(dolist (elt (directory-files site-lisp-dir))
|
||||
(unless (or (string= elt ".") (string= elt ".."))
|
||||
(add-to-list 'load-path (expand-file-name elt site-lisp-dir))))))
|
||||
#+END_SRC
|
||||
|
||||
* Emacs configuration
|
||||
|
||||
** Set up the package archives
|
||||
@ -69,31 +94,6 @@ Just to make sure, although most Linux DE does this for me.
|
||||
(set-default-coding-systems 'utf-8)
|
||||
#+END_SRC
|
||||
|
||||
* Add some directories to ~load-path~
|
||||
|
||||
** My own (version controlled) ~lisp~ directory
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(add-to-list 'load-path (expand-file-name
|
||||
(convert-standard-filename "lisp/")
|
||||
user-emacs-directory))
|
||||
(add-to-list 'load-path (expand-file-name
|
||||
(convert-standard-filename "lisp/nyan-prompt")
|
||||
user-emacs-directory))
|
||||
#+END_SRC
|
||||
|
||||
** The local site-lisp
|
||||
|
||||
…if it exists.
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(let ((site-lisp-dir "/usr/local/share/emacs/site-lisp"))
|
||||
(when (file-directory-p site-lisp-dir)
|
||||
(dolist (elt (directory-files site-lisp-dir))
|
||||
(unless (or (string= elt ".") (string= elt ".."))
|
||||
(add-to-list 'load-path (expand-file-name elt site-lisp-dir))))))
|
||||
#+END_SRC
|
||||
|
||||
* Load some prerequisites
|
||||
|
||||
** Load ~xdg-paths~
|
||||
|
Loading…
Reference in New Issue
Block a user