Function: hydra-multipop
hydra-multipop is a macro defined in hydra.el.
Signature
(hydra-multipop LST N)
Documentation
Return LST's first N elements while removing them.
Source Code
;; Defined in ~/.emacs.d/elpa/hydra-20250316.1254/hydra.el
(defmacro hydra-multipop (lst n)
"Return LST's first N elements while removing them."
`(if (<= (length ,lst) ,n)
(prog1 ,lst
(setq ,lst nil))
(prog1 ,lst
(setcdr
(nthcdr (1- ,n) (prog1 ,lst (setq ,lst (nthcdr ,n ,lst))))
nil))))