mirror of
https://github.com/doomemacs/doomemacs.git
synced 2026-04-27 15:20:52 -07:00
refactor(lib): deprecate setq!
`setq!` was introduced to fix `setopt` pulling in packages. Now that `setopt` was advised (infad44ca228) to fix the issue at the source, this macro is no longer necessary. Ref:fad44ca228
This commit is contained in:
parent
1c330eadce
commit
304030fdf8
1 changed files with 2 additions and 10 deletions
|
|
@ -836,16 +836,8 @@ issues"
|
||||||
(declare (obsolete "Use `cl-callf2' instead" "3.0.0"))
|
(declare (obsolete "Use `cl-callf2' instead" "3.0.0"))
|
||||||
`(setq ,sym (append ,sym ,@lists)))
|
`(setq ,sym (append ,sym ,@lists)))
|
||||||
|
|
||||||
(defmacro setq! (&rest settings)
|
;; DEPRECATED: Remove in v3
|
||||||
"A more sensible `setopt' for setting customizable variables.
|
(define-obsolete-function-alias 'setq! 'setopt "3.0.0")
|
||||||
|
|
||||||
This can be used as a drop-in replacement for `setq' and *should* be used
|
|
||||||
instead of `setopt'. Unlike `setq', this triggers custom setters on variables.
|
|
||||||
Unlike `setopt', this won't needlessly pull in dependencies."
|
|
||||||
(macroexp-progn
|
|
||||||
(cl-loop for (var val) on settings by 'cddr
|
|
||||||
collect `(funcall (or (get ',var 'custom-set) #'set-default-toplevel-value)
|
|
||||||
',var ,val))))
|
|
||||||
|
|
||||||
;; DEPRECATED: Remove in v3.0
|
;; DEPRECATED: Remove in v3.0
|
||||||
(defmacro delq! (elt list &optional fetcher)
|
(defmacro delq! (elt list &optional fetcher)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue