refactor: deprecate doom-private-dir for doom-user-dir
- Deprecates the doom-private-dir variable in favor of doom-user-dir. - Renames the pseudo category for the user's module: :private -> :user. - Renames the doom-private-error error type to doom-user-error. Emacs uses the term "user" to refer to the "things" in user space (e.g. user-init-file, user-emacs-directory, user-mail-address, xdg-user-dirs, package-user-dir, etc), and I'd like to be consistent with that. It also has the nice side-effect of being slightly shorter. I also hope 'doom-user-error' will be less obtuse to beginners than 'doom-private-error'.
This commit is contained in:
parent
ad6a3d0f33
commit
a5c80fcb4b
28 changed files with 101 additions and 96 deletions
|
@ -180,7 +180,7 @@
|
|||
(use-package! company-dict
|
||||
:defer t
|
||||
:config
|
||||
(setq company-dict-dir (expand-file-name "dicts" doom-private-dir))
|
||||
(setq company-dict-dir (expand-file-name "dicts" doom-user-dir))
|
||||
(add-hook! 'doom-project-hook
|
||||
(defun +company-enable-project-dicts-h (mode &rest _)
|
||||
"Enable per-project dictionaries."
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
;;;###autoload (add-hook 'org-mode-hook #'+literate-enable-recompile-h)
|
||||
|
||||
(defvar +literate-config-file
|
||||
(concat doom-private-dir "config.org")
|
||||
(concat doom-user-dir "config.org")
|
||||
"The file path of your literate config file.")
|
||||
|
||||
(defvar +literate-tangle--async-proc nil)
|
||||
|
@ -52,7 +52,7 @@
|
|||
(or (getenv "__NOTANGLE")
|
||||
(and (+literate-tangle +literate-config-file
|
||||
(concat doom-module-config-file ".el")
|
||||
doom-private-dir)
|
||||
doom-user-dir)
|
||||
(or (not noninteractive)
|
||||
(exit! "__NOTANGLE=1 $@")))))
|
||||
|
||||
|
@ -77,7 +77,7 @@
|
|||
`(funcall #',(symbol-function #'+literate-tangle)
|
||||
,+literate-config-file
|
||||
,(concat doom-module-config-file ".el")
|
||||
,doom-private-dir))))
|
||||
,doom-user-dir))))
|
||||
(add-hook 'kill-emacs-hook #'+literate-tangle-check-finished-h)
|
||||
(set-process-sentinel +literate-tangle--async-proc #'+literate-tangle--async-sentinel)
|
||||
(run-at-time nil nil (lambda () (message "Tangling config.org"))) ; ensure shown after a save message
|
||||
|
@ -132,9 +132,9 @@ This is performed with an asyncronous Emacs process, except when
|
|||
|
||||
;;;###autoload
|
||||
(defun +literate-recompile-maybe-h ()
|
||||
"Recompile literate config to `doom-private-dir'.
|
||||
"Recompile literate config to `doom-user-dir'.
|
||||
|
||||
We assume any org file in `doom-private-dir' is connected to your literate
|
||||
We assume any org file in `doom-user-dir' is connected to your literate
|
||||
config, and should trigger a recompile if changed."
|
||||
(and (file-in-directory-p
|
||||
(buffer-file-name (buffer-base-buffer))
|
||||
|
|
|
@ -92,8 +92,8 @@ evil is loaded and enabled)."
|
|||
(match-string 1 path))
|
||||
((file-in-directory-p path doom-emacs-dir)
|
||||
(file-relative-name path doom-emacs-dir))
|
||||
((file-in-directory-p path doom-private-dir)
|
||||
(file-relative-name path doom-private-dir))
|
||||
((file-in-directory-p path doom-user-dir)
|
||||
(file-relative-name path doom-user-dir))
|
||||
((abbreviate-file-name path))))))
|
||||
|
||||
;;;###autoload
|
||||
|
|
|
@ -116,7 +116,7 @@ information.")
|
|||
|
||||
(defun +file-templates-in-emacs-dirs-p (file)
|
||||
"Returns t if FILE is in Doom or your private directory."
|
||||
(or (file-in-directory-p file doom-private-dir)
|
||||
(or (file-in-directory-p file doom-user-dir)
|
||||
(file-in-directory-p file doom-emacs-dir)))
|
||||
|
||||
(defun +file-template-p (rule)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
;;; editor/snippets/config.el -*- lexical-binding: t; -*-
|
||||
|
||||
(defvar +snippets-dir (expand-file-name "snippets/" doom-private-dir)
|
||||
(defvar +snippets-dir (expand-file-name "snippets/" doom-user-dir)
|
||||
"Directory where `yasnippet' will search for your private snippets.")
|
||||
|
||||
|
||||
|
|
|
@ -17,8 +17,8 @@
|
|||
|
||||
(setq wl-demo nil
|
||||
wl-stay-folder-window t
|
||||
wl-init-file (expand-file-name "wl.el" doom-private-dir)
|
||||
wl-folders-file (expand-file-name "folders.wl" doom-private-dir))
|
||||
wl-init-file (expand-file-name "wl.el" doom-user-dir)
|
||||
wl-folders-file (expand-file-name "folders.wl" doom-user-dir))
|
||||
|
||||
(setq wl-message-truncate-lines t
|
||||
wl-summary-width 120
|
||||
|
|
|
@ -247,7 +247,7 @@ https://emacs.stackexchange.com/questions/10230/how-to-indent-keywords-aligned"
|
|||
;;;###autoload
|
||||
(defun +emacs-lisp-reduce-flycheck-errors-in-emacs-config-h ()
|
||||
"Remove `emacs-lisp-checkdoc' checker and reduce `emacs-lisp' checker
|
||||
verbosity when editing a file in `doom-private-dir' or `doom-emacs-dir'."
|
||||
verbosity when editing a file in `doom-user-dir' or `doom-emacs-dir'."
|
||||
(when (and (bound-and-true-p flycheck-mode)
|
||||
(eq major-mode 'emacs-lisp-mode)
|
||||
(or (not default-directory)
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
This marks a foldable marker for `outline-minor-mode' in elisp buffers.")
|
||||
|
||||
(defvar +emacs-lisp-disable-flycheck-in-dirs
|
||||
(list doom-emacs-dir doom-private-dir)
|
||||
(list doom-emacs-dir doom-user-dir)
|
||||
"List of directories to disable `emacs-lisp-checkdoc' in.
|
||||
|
||||
This checker tends to produce a lot of false positives in your .emacs.d and
|
||||
|
|
|
@ -386,7 +386,7 @@ Or to create aliases for functions that behave differently:
|
|||
;;; Lets say we're in ~/.doom.d/config.el
|
||||
(load! "lisp/module") ; loads ~/.doom.d/lisp/module.el
|
||||
(load! "somefile" doom-emacs-dir) ; loads ~/.emacs.d/somefile.el
|
||||
(load! "anotherfile" doom-private-dir) ; loads ~/.doom.d/anotherfile.el
|
||||
(load! "anotherfile" doom-user-dir) ; loads ~/.doom.d/anotherfile.el
|
||||
|
||||
;; If you don't want a `load!' call to throw an error if the file doesn't exist:
|
||||
(load! "~/.maynotexist" nil t)
|
||||
|
|
|
@ -532,7 +532,7 @@ relative to `org-directory', unless it is an absolute path."
|
|||
'("wolfram" . "https://wolframalpha.com/input/?i=%s")
|
||||
'("doom" . "https://github.com/hlissner/doom-emacs/%s")
|
||||
`("emacsdir" . ,(doom-path doom-emacs-dir "%s"))
|
||||
`("doomdir" . ,(doom-path doom-private-dir "%s")))
|
||||
`("doomdir" . ,(doom-path doom-user-dir "%s")))
|
||||
|
||||
(+org-define-basic-link "org" 'org-directory)
|
||||
(+org-define-basic-link "doom" 'doom-emacs-dir)
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
;; is restored.
|
||||
|
||||
(defvar +eshell-config-dir
|
||||
(expand-file-name "eshell/" doom-private-dir)
|
||||
(expand-file-name "eshell/" doom-user-dir)
|
||||
"Where to store eshell configuration files, as opposed to
|
||||
`eshell-directory-name', which is where Doom will store temporary/data files.")
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ Can be a list of backends; accepts any value `company-backends' accepts.")
|
|||
lsp-vetur-global-snippets-dir
|
||||
(expand-file-name
|
||||
"vetur" (or (bound-and-true-p +snippets-dir)
|
||||
(concat doom-private-dir "snippets/")))
|
||||
(concat doom-user-dir "snippets/")))
|
||||
lsp-xml-jar-file (expand-file-name "org.eclipse.lsp4xml-0.3.0-uber.jar" lsp-server-install-dir)
|
||||
lsp-groovy-server-file (expand-file-name "groovy-language-server-all.jar" lsp-server-install-dir))
|
||||
|
||||
|
|
|
@ -69,7 +69,7 @@ Possible values:
|
|||
:action bookmark-jump)
|
||||
("Open private configuration"
|
||||
:icon (all-the-icons-octicon "tools" :face 'doom-dashboard-menu-title)
|
||||
:when (file-directory-p doom-private-dir)
|
||||
:when (file-directory-p doom-user-dir)
|
||||
:action doom/open-private-config)
|
||||
("Open documentation"
|
||||
:icon (all-the-icons-octicon "book" :face 'doom-dashboard-menu-title)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue