Change doom-plist-delete to delete N props

This commit is contained in:
Henrik Lissner 2020-01-30 16:58:31 -05:00
parent b8c25b6b4e
commit ede5beed7a
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -83,11 +83,11 @@ BODY."
p)) p))
;;;###autoload ;;;###autoload
(defun doom-plist-delete (plist prop) (defun doom-plist-delete (plist &rest props)
"Delete PROP from a copy of PLIST." "Delete PROPS from a copy of PLIST."
(let (p) (let (p)
(while plist (while plist
(if (not (eq prop (car plist))) (if (not (memq (car plist) props))
(plist-put! p (car plist) (nth 1 plist))) (plist-put! p (car plist) (nth 1 plist)))
(setq plist (cddr plist))) (setq plist (cddr plist)))
p)) p))