diff options
| author | Daniel Mendler <mail@daniel-mendler.de> | 2023-01-17 23:41:53 +0100 |
|---|---|---|
| committer | Daniel Mendler <mail@daniel-mendler.de> | 2023-01-17 23:41:53 +0100 |
| commit | 897d9fbbbad2e7552137fff1bea7b9c0daa68b61 (patch) | |
| tree | 99cbd847d60bc83b64577dd417186dad80258e6f /compat-29.el | |
| parent | 64dfe9f910954392925a8114b8cf2301af4fbe4d (diff) | |
compat-29: Add plistp
Diffstat (limited to 'compat-29.el')
| -rw-r--r-- | compat-29.el | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/compat-29.el b/compat-29.el index bae8f07..3c3dc51 100644 --- a/compat-29.el +++ b/compat-29.el @@ -84,6 +84,11 @@ Unibyte strings are converted to multibyte for comparison." (declare (pure t) (side-effect-free t)) (eq t (compare-strings string1 0 nil string2 0 nil t))) +(compat-defun plistp (object) ;; <compat-tests:plistp> + "Non-nil if and only if OBJECT is a valid plist." + (let ((len (proper-list-p object))) + (and len (zerop (% len 2))))) + (compat-defun plist-get (plist prop &optional predicate) ;; <compat-tests:plist-get> "Handle optional argument PREDICATE." :explicit t |
