From 4978f588443f0ac27c75676697c2cc1b8beae668 Mon Sep 17 00:00:00 2001 From: Yasushi SHOJI Date: Mon, 20 Sep 2021 02:09:29 +0900 Subject: [PATCH 2/3] org-macs: Introduce org-plist-delete-all In some cases we want to remove multiple properties from a plist. This function just for that. Signed-off-by: Yasushi SHOJI --- lisp/org-macs.el | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lisp/org-macs.el b/lisp/org-macs.el index 18ae642c7..bd4bb5066 100644 --- a/lisp/org-macs.el +++ b/lisp/org-macs.el @@ -538,6 +538,11 @@ that may remove elements by altering the list structure." (setq list (delete (pop elts) list))) list) +(defun org-plist-delete-all (plist props) + "Delete all elements in PROPS from PLIST" + (dolist (e props plist) + (setq plist (org-plist-delete plist e)))) + (defun org-plist-delete (plist property) "Delete PROPERTY from PLIST. This is in contrast to merely setting it to 0." -- 2.33.0