diff options
| author | Daniel Mendler <mail@daniel-mendler.de> | 2023-01-17 23:45:02 +0100 |
|---|---|---|
| committer | Daniel Mendler <mail@daniel-mendler.de> | 2023-01-17 23:45:02 +0100 |
| commit | 64dc62259f1adc6ae70a38f7a874cee48dfa3626 (patch) | |
| tree | 4eb02c88df86dda53f99297de400dfd436588234 /compat-29.el | |
| parent | 897d9fbbbad2e7552137fff1bea7b9c0daa68b61 (diff) | |
compat-29: Add list-of-strings-p
Diffstat (limited to 'compat-29.el')
| -rw-r--r-- | compat-29.el | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/compat-29.el b/compat-29.el index 3c3dc51..e84c628 100644 --- a/compat-29.el +++ b/compat-29.el @@ -84,6 +84,13 @@ 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 list-of-strings-p (object) ;; <compat-tests:lists-of-strings-p> + "Return t if OBJECT is nil or a list of strings." + (declare (pure t) (side-effect-free t)) + (while (and (consp object) (stringp (car object))) + (setq object (cdr object))) + (null object)) + (compat-defun plistp (object) ;; <compat-tests:plistp> "Non-nil if and only if OBJECT is a valid plist." (let ((len (proper-list-p object))) |
