mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-03 12:27:26 -05:00
refactor: deprecate appendq!, prependq!, & delq! macros
In the interest of slimming down Doom's core (as we near v3), I've deprecated these macros. They doesn't really need to exist. Sure, the alternatives aren't as ergonomic or elegant, but they're good enough that we don't need these trivial wrappers. Their local uses have been refactored out as well.
This commit is contained in:
@ -45,8 +45,7 @@ name under `pcache-directory' (by default a subdirectory under
|
||||
"Persist VARIABLES (list of symbols) in LOCATION (symbol).
|
||||
This populates these variables with cached values, if one exists, and saves them
|
||||
to file when Emacs quits. This cannot persist buffer-local variables."
|
||||
(cl-check-type location string)
|
||||
(dolist (var variables)
|
||||
(dolist (var (ensure-list variables))
|
||||
(when (doom-store-member-p var location)
|
||||
(set var (doom-store-get var location))))
|
||||
(setf (alist-get location doom-store-persist-alist)
|
||||
@ -57,12 +56,10 @@ to file when Emacs quits. This cannot persist buffer-local variables."
|
||||
"Unregisters VARIABLES (list of symbols) in LOCATION (symbol).
|
||||
Variables to persist are recorded in `doom-store-persist-alist'. Does not affect
|
||||
the actual variables themselves or their values."
|
||||
(cl-check-type location string)
|
||||
(if variables
|
||||
(setf (alist-get location doom-store-persist-alist)
|
||||
(setf (alist-get location doom-store-persist-alist nil t)
|
||||
(if variables
|
||||
(cl-set-difference (cdr (assq location doom-store-persist-alist))
|
||||
variables))
|
||||
(delq! location doom-store-persist-alist 'assoc)))
|
||||
variables))))
|
||||
|
||||
(defun doom--store-init (&optional location)
|
||||
(cl-check-type location (or null string))
|
||||
|
Reference in New Issue
Block a user