]> git.eshelyaron.com Git - emacs.git/commitdiff
Add the missing plist-delete
authorJohn Wiegley <johnw@newartisans.com>
Fri, 1 Dec 2017 02:36:45 +0000 (18:36 -0800)
committerJohn Wiegley <johnw@newartisans.com>
Fri, 1 Dec 2017 02:36:45 +0000 (18:36 -0800)
test/lisp/use-package/use-package-tests.el

index 29a0b99512e2d3c8185283fd08a35b046a769906..43ecb316aca4e2bcd527bdb652e455356f42f250 100644 (file)
 
 ;; `cl-flet' does not work for the mocking we do below, while `flet' does.
 (eval-when-compile
+  (defun plist-delete (plist property)
+    "Delete PROPERTY from PLIST"
+    (let (p)
+      (while plist
+        (if (not (eq property (car plist)))
+            (setq p (plist-put p (car plist) (nth 1 plist))))
+        (setq plist (cddr plist)))
+      p))
+
   (setplist 'flet (plist-delete (symbol-plist 'flet) 'byte-obsolete-info)))
 
 (ert-deftest use-package-test-recognize-function ()