Do not hard-code ~/emacs.d
Instead, use user-emacs-directory
This commit is contained in:
parent
ee86ebea76
commit
6457d54ec7
2
init.el
2
init.el
@ -10,7 +10,7 @@
|
||||
(error "This is made form Emacs >=24"))
|
||||
|
||||
(defconst emacs-start-time (current-time))
|
||||
(add-to-list 'load-path (expand-file-name "~/.emacs.d/modules/" user-emacs-directory))
|
||||
(add-to-list 'load-path (concat user-emacs-directory "modules"))
|
||||
|
||||
;;; Raise garbage collection threshold after init
|
||||
(add-hook 'after-init-hook
|
||||
|
@ -76,7 +76,7 @@
|
||||
(global-undo-tree-mode 1))
|
||||
|
||||
;;----------------------------------------------------------------------------
|
||||
(load-file "~/.emacs.d/modules/lib/myemacs.el")
|
||||
(load-file (concat user-emacs-directory "/modules/lib/myemacs.el"))
|
||||
|
||||
(provide 'init-editing-utils)
|
||||
|
||||
|
@ -47,7 +47,7 @@
|
||||
(global-set-key (kbd "M-%") 'anzu-query-replace)
|
||||
(global-set-key (kbd "s-<SPC>") 'anzu-query-replace))
|
||||
|
||||
(load-file "~/.emacs.d/modules/lib/myemacs.el")
|
||||
(load-file (concat user-emacs-directory "/modules/lib/myemacs.el"))
|
||||
(provide 'init-modeline)
|
||||
|
||||
;; End:
|
||||
|
@ -13,7 +13,7 @@ read the .el files"
|
||||
(mapc load-it (directory-files dir nil "\\.el$"))))
|
||||
|
||||
;; Load lib functions
|
||||
(load-directory (expand-file-name "~/.emacs.d/modules/lib/" user-emacs-directory))
|
||||
(load-directory (concat user-emacs-directory "/modules/lib/"))
|
||||
|
||||
;; This is borrowed from https://github.com/purcell/emacs.d/blob/master/lisp/init-utils.el by Steve Purcell but I have added some stuff.
|
||||
(if (fboundp 'with-eval-after-load)
|
||||
@ -25,7 +25,7 @@ read the .el files"
|
||||
'(progn ,@body))))
|
||||
|
||||
;; Elapsed time
|
||||
(load-file "~/.emacs.d/modules/lib/myemacs.el")
|
||||
(load-file (concat user-emacs-directory "/modules/lib/myemacs.el"))
|
||||
|
||||
(provide 'init-utils)
|
||||
;;; init-utils.el ends here
|
||||
|
Loading…
x
Reference in New Issue
Block a user