Move pre-initialization steps to the top of my config

This commit is contained in:
Gergely Polonkai 2023-10-15 05:20:38 +02:00
parent 1a90cb599f
commit 4c11f8190d
No known key found for this signature in database
GPG Key ID: 2D2885533B869ED4
1 changed files with 11 additions and 13 deletions

View File

@ -1,32 +1,30 @@
* Add some directories to ~load-path~
* Pre-init
** My own (version controlled) ~lisp~ directory
** Add my own, version controlled ~lisp~ directory to ~load-path~
#+BEGIN_SRC emacs-lisp
#+begin_src emacs-lisp
(add-to-list 'load-path (expand-file-name
(convert-standard-filename "lisp/")
user-emacs-directory))
#+END_SRC
#+end_src
** The local site-lisp
** Do the same with the local ~site-lisp~ if its there
…if it exists.
#+BEGIN_SRC emacs-lisp
#+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
#+end_src
** Load ~xdg-paths~
#+BEGIN_SRC emacs-lisp
I prefer using freedesktops desktop specification everywhere.
#+begin_src emacs-lisp
(load "xdg-paths")
#+END_SRC
#+end_src
* Emacs configuration