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
|
@ -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))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue