mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-03 12:27:26 -05:00
core-lib: refactor pushnew! macro
Do a little more work at expand-time.
This commit is contained in:
@ -177,8 +177,8 @@ Accepts the same arguments as `message'."
|
|||||||
(defmacro pushnew! (place &rest values)
|
(defmacro pushnew! (place &rest values)
|
||||||
"Like `cl-pushnew', but will prepend VALUES to PLACE.
|
"Like `cl-pushnew', but will prepend VALUES to PLACE.
|
||||||
The order VALUES is preserved."
|
The order VALUES is preserved."
|
||||||
`(dolist (--value-- (nreverse (list ,@values)))
|
`(dolist (--x-- (list ,@(nreverse values)))
|
||||||
(cl-pushnew --value-- ,place)))
|
(cl-pushnew --x-- ,place)))
|
||||||
|
|
||||||
(defmacro prependq! (sym &rest lists)
|
(defmacro prependq! (sym &rest lists)
|
||||||
"Prepend LISTS to SYM in place."
|
"Prepend LISTS to SYM in place."
|
||||||
|
Reference in New Issue
Block a user