fix: remove outdated uses of user-emacs-directory

Doom changes user-emacs-directory (see 46844b5 for explanation), so
doom-emacs-dir should be used to refer to your $EMACSDIR instead.

Fix: #6530
Ref: 46844b55de
This commit is contained in:
Henrik Lissner 2022-07-04 02:34:51 +02:00
parent 5a98d59afc
commit 442d607ec0
No known key found for this signature in database
GPG key ID: B60957CA074D39A3
4 changed files with 6 additions and 6 deletions

View file

@ -258,7 +258,7 @@ ready to be pasted in a bug report on github."
'envvar-file) 'envvar-file)
(if (featurep 'exec-path-from-shell) (if (featurep 'exec-path-from-shell)
'exec-path-from-shell) 'exec-path-from-shell)
(if (file-symlink-p user-emacs-directory) (if (file-symlink-p doom-emacs-dir)
'symlinked-emacsdir) 'symlinked-emacsdir)
(if (file-symlink-p doom-private-dir) (if (file-symlink-p doom-private-dir)
'symlinked-doomdir) 'symlinked-doomdir)

View file

@ -125,7 +125,7 @@ in."
(dir (if (file-directory-p xdg-dir) (dir (if (file-directory-p xdg-dir)
xdg-dir xdg-dir
doom-dir))) doom-dir)))
(when (file-equal-p dir user-emacs-directory) (when (file-equal-p dir doom-emacs-dir)
(print! (error "Doom was cloned to %S, not ~/.emacs.d or ~/.config/emacs" (print! (error "Doom was cloned to %S, not ~/.emacs.d or ~/.config/emacs"
(path dir))) (path dir)))
(explain! "Doom's source and your private Doom config have to live in separate directories. " (explain! "Doom's source and your private Doom config have to live in separate directories. "
@ -140,7 +140,7 @@ in."
(explain! "The second directory will be ignored, as it has lower precedence."))) (explain! "The second directory will be ignored, as it has lower precedence.")))
(print! (start "Checking for stale elc files...")) (print! (start "Checking for stale elc files..."))
(elc-check-dir user-emacs-directory) (elc-check-dir doom-emacs-dir)
(print! (start "Checking for problematic git global settings...")) (print! (start "Checking for problematic git global settings..."))
(if (executable-find "git") (if (executable-find "git")

View file

@ -377,7 +377,7 @@ This value is cached. If REFRESH-P, then don't use the cached value."
(or (and (stringp arg) (or (and (stringp arg)
(not (file-name-absolute-p arg)) (not (file-name-absolute-p arg))
(ignore-errors (dir!))) (ignore-errors (dir!)))
user-emacs-directory))) doom-emacs-dir)))
(funcall fn label arg recursed))) (funcall fn label arg recursed)))
;; Adds two keywords to `use-package' to expand its lazy-loading capabilities: ;; Adds two keywords to `use-package' to expand its lazy-loading capabilities:

View file

@ -23,9 +23,9 @@ If prefix ARG is set, prompt for a directory to search from."
;;;###autoload ;;;###autoload
(defun +default/search-emacsd () (defun +default/search-emacsd ()
"Conduct a text search in files under `user-emacs-directory'." "Conduct a text search in files under `doom-emacs-dir'."
(interactive) (interactive)
(let ((default-directory user-emacs-directory)) (let ((default-directory doom-emacs-dir))
(call-interactively (call-interactively
(cond ((featurep! :completion ivy) #'+ivy/project-search-from-cwd) (cond ((featurep! :completion ivy) #'+ivy/project-search-from-cwd)
((featurep! :completion helm) #'+helm/project-search-from-cwd) ((featurep! :completion helm) #'+helm/project-search-from-cwd)