In my ~/.emacs.d/init.el
, I have just three lines:
(push (expand-file-name "lisp" user-emacs-directory) load-path)
(require 'init-vars)
(provide 'init)
In my ~/.emacs.d/lisp/init-vars.el
, I have below three lines:
(require 'dired)
(setq dired-use-ls-dired nil)
(provide 'init-vars)
Flycheck reports error at line 2 of ~/.emacs.d/init.el
:
Cannot open load file: No such file or directory, init-vars
What am I missing here?
If I change the line to (require 'init-vars (expand-file-name "lisp/init-vars.el" user-emacs-directory))
then the error is gone. I don't get why load-path
isn't working.