emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/compat c6087da01a 02/12: Mark tested functions


From: ELPA Syncer
Subject: [elpa] externals/compat c6087da01a 02/12: Mark tested functions
Date: Wed, 4 Jan 2023 12:57:35 -0500 (EST)

branch: externals/compat
commit c6087da01a4c85015408f7a724610b880fd41064
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>

    Mark tested functions
---
 compat-24.el    | 52 ++++++++++++++++++++++++++--------------------------
 compat-25.el    | 12 ++++++------
 compat-26.el    | 56 ++++++++++++++++++++++++++++----------------------------
 compat-27.el    | 22 +++++++++++-----------
 compat-28.el    | 16 ++++++++--------
 compat-29.el    | 12 ++++++------
 compat-macs.el  |  2 +-
 compat-tests.el | 17 +++++++++++++++--
 8 files changed, 101 insertions(+), 88 deletions(-)

diff --git a/compat-24.el b/compat-24.el
index 1c969f0b8a..206240cc10 100644
--- a/compat-24.el
+++ b/compat-24.el
@@ -27,7 +27,7 @@
 
 ;;;; Defined in data.c
 
-(compat-defun = (number-or-marker &rest numbers-or-markers) ;; <UNTESTED>
+(compat-defun = (number-or-marker &rest numbers-or-markers) ;; <OK>
   "Handle multiple arguments."
   :explicit t
   (catch 'fail
@@ -37,7 +37,7 @@
       (setq number-or-marker (pop numbers-or-markers)))
     t))
 
-(compat-defun < (number-or-marker &rest numbers-or-markers) ;; <UNTESTED>
+(compat-defun < (number-or-marker &rest numbers-or-markers) ;; <OK>
   "Handle multiple arguments."
   :explicit t
   (catch 'fail
@@ -47,7 +47,7 @@
       (setq number-or-marker (pop numbers-or-markers)))
     t))
 
-(compat-defun > (number-or-marker &rest numbers-or-markers) ;; <UNTESTED>
+(compat-defun > (number-or-marker &rest numbers-or-markers) ;; <OK>
   "Handle multiple arguments."
   :explicit t
   (catch 'fail
@@ -57,7 +57,7 @@
       (setq number-or-marker (pop numbers-or-markers)))
     t))
 
-(compat-defun <= (number-or-marker &rest numbers-or-markers) ;; <UNTESTED>
+(compat-defun <= (number-or-marker &rest numbers-or-markers) ;; <OK>
   "Handle multiple arguments."
   :explicit t
   (catch 'fail
@@ -67,7 +67,7 @@
       (setq number-or-marker (pop numbers-or-markers)))
     t))
 
-(compat-defun >= (number-or-marker &rest numbers-or-markers) ;; <UNTESTED>
+(compat-defun >= (number-or-marker &rest numbers-or-markers) ;; <OK>
   "Handle multiple arguments."
   :explicit t
   (catch 'fail
@@ -76,7 +76,7 @@
         (throw 'fail nil)))
     t))
 
-(compat-defun bool-vector-exclusive-or (a b &optional c) ;; <UNTESTED>
+(compat-defun bool-vector-exclusive-or (a b &optional c) ;; <OR>
   "Return A ^ B, bitwise exclusive or.
 If optional third argument C is given, store result into C.
 A, B, and C must be bool vectors of the same length.
@@ -99,7 +99,7 @@ Return the destination vector if it changed or nil otherwise."
         (aset dest i val)))
     (if c (and changed c) dest)))
 
-(compat-defun bool-vector-union (a b &optional c) ;; <UNTESTED>
+(compat-defun bool-vector-union (a b &optional c) ;; <OK>
   "Return A | B, bitwise or.
 If optional third argument C is given, store result into C.
 A, B, and C must be bool vectors of the same length.
@@ -122,7 +122,7 @@ Return the destination vector if it changed or nil 
otherwise."
         (aset dest i val)))
     (if c (and changed c) dest)))
 
-(compat-defun bool-vector-intersection (a b &optional c) ;; <UNTESTED>
+(compat-defun bool-vector-intersection (a b &optional c) ;; <OK>
   "Return A & B, bitwise and.
 If optional third argument C is given, store result into C.
 A, B, and C must be bool vectors of the same length.
@@ -145,7 +145,7 @@ Return the destination vector if it changed or nil 
otherwise."
         (aset dest i val)))
     (if c (and changed c) dest)))
 
-(compat-defun bool-vector-set-difference (a b &optional c) ;; <UNTESTED>
+(compat-defun bool-vector-set-difference (a b &optional c) ;; <OK>
   "Return A &~ B, set difference.
 If optional third argument C is given, store result into C.
 A, B, and C must be bool vectors of the same length.
@@ -168,7 +168,7 @@ Return the destination vector if it changed or nil 
otherwise."
         (aset dest i val)))
     (if c (and changed c) dest)))
 
-(compat-defun bool-vector-not (a &optional b) ;; <UNTESTED>
+(compat-defun bool-vector-not (a &optional b) ;; <OK>
   "Compute ~A, set complement.
 If optional second argument B is given, store result into B.
 A and B must be bool vectors of the same length.
@@ -184,7 +184,7 @@ Return the destination vector."
       (aset dest i (not (aref a i))))
     dest))
 
-(compat-defun bool-vector-subsetp (a b) ;; <UNTESTED>
+(compat-defun bool-vector-subsetp (a b) ;; <OK>
   "Return t if every t value in A is also t in B, nil otherwise.
 A and B must be bool vectors of the same length."
   (unless (bool-vector-p a)
@@ -199,7 +199,7 @@ A and B must be bool vectors of the same length."
         (throw 'not-subset nil)))
     t))
 
-(compat-defun bool-vector-count-consecutive (a b i) ;; <UNTESTED>
+(compat-defun bool-vector-count-consecutive (a b i) ;; <OK>
   "Count how many consecutive elements in A equal B starting at I.
 A is a bool vector, B is t or nil, and I is an index into A."
   (unless (bool-vector-p a)
@@ -212,7 +212,7 @@ A is a bool vector, B is t or nil, and I is an index into 
A."
       (setq i (1+ i)))
     (- i n)))
 
-(compat-defun bool-vector-count-population (a) ;; <UNTESTED>
+(compat-defun bool-vector-count-population (a) ;; <OK>
   "Count how many elements in A are t.
 A is a bool vector.  To count A's nil elements, subtract the
 return value from A's length."
@@ -226,7 +226,7 @@ return value from A's length."
 
 ;;;; Defined in subr.el
 
-(compat-defmacro with-eval-after-load (file &rest body)
+(compat-defmacro with-eval-after-load (file &rest body)UNTESTED>
   "Execute BODY after FILE is loaded.
 FILE is normally a feature name, but it can also be a file name,
 in case that file does not provide any feature.  See `eval-after-load'
@@ -236,7 +236,7 @@ for more details about the different forms of FILE and 
their semantics."
   ;; `eval-after-load' is used to preserve compatibility with 24.3.
   `(eval-after-load ,file `(funcall ',,`(lambda () ,@body))))
 
-(compat-defun special-form-p (object) ;; <UNTESTED>
+(compat-defun special-form-p (object) ;; <OK>
   "Non-nil if and only if OBJECT is a special form."
   (if (and (symbolp object) (fboundp object))
       (setq object (condition-case nil
@@ -244,7 +244,7 @@ for more details about the different forms of FILE and 
their semantics."
                      (void-function nil))))
   (and (subrp object) (eq (cdr (subr-arity object)) 'unevalled)))
 
-(compat-defun macrop (object) ;; <UNTESTED>
+(compat-defun macrop (object) ;; <OK>
   "Non-nil if and only if OBJECT is a macro."
   (let ((def (condition-case nil
                  (indirect-function object)
@@ -253,7 +253,7 @@ for more details about the different forms of FILE and 
their semantics."
       (or (eq 'macro (car def))
           (and (autoloadp def) (memq (nth 4 def) '(macro t)))))))
 
-(compat-defun string-suffix-p (suffix string  &optional ignore-case) ;; 
<UNTESTED>
+(compat-defun string-suffix-p (suffix string  &optional ignore-case) ;; <OK>
   "Return non-nil if SUFFIX is a suffix of STRING.
 If IGNORE-CASE is non-nil, the comparison is done without paying
 attention to case differences."
@@ -262,7 +262,7 @@ attention to case differences."
          (eq t (compare-strings suffix nil nil
                                 string start-pos nil ignore-case)))))
 
-(compat-defun split-string (string &optional separators omit-nulls trim) ;; 
<UNTESTED>
+(compat-defun split-string (string &optional separators omit-nulls trim) ;; 
<OK>
   "Extend `split-string' by a TRIM argument.
 The remaining arguments STRING, SEPARATORS and OMIT-NULLS are
 handled just as with `split-string'."
@@ -280,7 +280,7 @@ handled just as with `split-string'."
                     token)))
     (if omit-nulls (delete "" trimmed) trimmed)))
 
-(compat-defun delete-consecutive-dups (list &optional circular) ;; <UNTESTED>
+(compat-defun delete-consecutive-dups (list &optional circular) ;; <OK>
   "Destructively remove `equal' consecutive duplicates from LIST.
 First and last elements are considered consecutive if CIRCULAR is
 non-nil."
@@ -363,7 +363,7 @@ When IGNORE-CASE is non-nil, FUN is expected to be 
case-insensitive."
 
 ;;;; Defined in subr-x.el
 
-(compat-defun hash-table-keys (hash-table) ;; <UNTESTED>
+(compat-defun hash-table-keys (hash-table) ;; <OK>
   "Return a list of keys in HASH-TABLE."
   (let (values)
     (maphash
@@ -371,7 +371,7 @@ When IGNORE-CASE is non-nil, FUN is expected to be 
case-insensitive."
      hash-table)
     values))
 
-(compat-defun hash-table-values (hash-table) ;; <UNTESTED>
+(compat-defun hash-table-values (hash-table) ;; <OK>
   "Return a list of values in HASH-TABLE."
   (let (values)
     (maphash
@@ -379,29 +379,29 @@ When IGNORE-CASE is non-nil, FUN is expected to be 
case-insensitive."
      hash-table)
     values))
 
-(compat-defun string-empty-p (string) ;; <UNTESTED>
+(compat-defun string-empty-p (string) ;; <OK>
   "Check whether STRING is empty."
   (string= string ""))
 
-(compat-defun string-join (strings &optional separator) ;; <UNTESTED>
+(compat-defun string-join (strings &optional separator) ;; <OK>
   "Join all STRINGS using SEPARATOR.
 Optional argument SEPARATOR must be a string, a vector, or a list of
 characters; nil stands for the empty string."
   (mapconcat #'identity strings separator))
 
-(compat-defun string-blank-p (string) ;; <UNTESTED>
+(compat-defun string-blank-p (string) ;; <OK>
   "Check whether STRING is either empty or only whitespace.
 The following characters count as whitespace here: space, tab, newline and
 carriage return."
   (string-match-p "\\`[ \t\n\r]*\\'" string))
 
-(compat-defun string-remove-prefix (prefix string) ;; <UNTESTED>
+(compat-defun string-remove-prefix (prefix string) ;; <OK>
   "Remove PREFIX from STRING if present."
   (if (string-prefix-p prefix string)
       (substring string (length prefix))
     string))
 
-(compat-defun string-remove-suffix (suffix string) ;; <UNTESTED>
+(compat-defun string-remove-suffix (suffix string) ;; <OK>
   "Remove SUFFIX from STRING if present."
   (if (string-suffix-p suffix string)
       (substring string 0 (- (length string) (length suffix)))
diff --git a/compat-25.el b/compat-25.el
index c995ecd082..18d1da0f9e 100644
--- a/compat-25.el
+++ b/compat-25.el
@@ -81,13 +81,13 @@ This implementation is equivalent to `format'."
 
 ;;;; Defined in subr.el
 
-(compat-defun string-greaterp (string1 string2) ;; <UNTESTED>
+(compat-defun string-greaterp (string1 string2) ;; <OK>
   "Return non-nil if STRING1 is greater than STRING2 in lexicographic order.
 Case is significant.
 Symbols are also allowed; their print names are used instead."
   (string-lessp string2 string1))
 
-(compat-defmacro with-file-modes (modes &rest body)
+(compat-defmacro with-file-modes (modes &rest body) ;; <UNTESTED>
   "Execute BODY with default file permissions temporarily set to MODES.
 MODES is as for `set-default-file-modes'."
   (declare (indent 1) (debug t))
@@ -118,7 +118,7 @@ Equality with KEY is tested by TESTFN, defaulting to `eq'."
         default)))
     (if entry (cdr entry) default)))
 
-(compat-defmacro if-let (spec then &rest else)
+(compat-defmacro if-let (spec then &rest else) ;; <UNTESTED>
   "Bind variables according to SPEC and evaluate THEN or ELSE.
 Evaluate each binding in turn, as in `let*', stopping if a
 binding value is nil.  If all are non-nil return the value of
@@ -153,7 +153,7 @@ with an old syntax that accepted only one binding."
     `(let* ,(nreverse list)
        (if ,(caar list) ,then ,@else))))
 
-(compat-defmacro when-let (spec &rest body)
+(compat-defmacro when-let (spec &rest body) ;; <UNTESTED>
   "Bind variables according to SPEC and conditionally evaluate BODY.
 Evaluate each binding in turn, stopping if a binding value is nil.
 If all are non-nil, return the value of the last form in BODY.
@@ -180,7 +180,7 @@ The variable list SPEC is the same as in `if-let'."
 
 ;;;; Defined in subr-x.el
 
-(compat-defmacro thread-first (&rest forms)
+(compat-defmacro thread-first (&rest forms) ;; <UNTESTED>
   "Thread FORMS elements as the first argument of their successor.
 Example:
     (thread-first
@@ -204,7 +204,7 @@ threading."
                          (cdr form))))
     body))
 
-(compat-defmacro thread-last (&rest forms)
+(compat-defmacro thread-last (&rest forms) ;; <UNTESTED>
   "Thread FORMS elements as the last argument of their successor.
 Example:
     (thread-last
diff --git a/compat-26.el b/compat-26.el
index 182b5723af..ee4e3f4036 100644
--- a/compat-26.el
+++ b/compat-26.el
@@ -115,7 +115,7 @@ just like `assoc'."
             (throw 'found ent))))
     (assoc key alist)))
 
-(compat-defun mapcan (func sequence) ;; <UNTESTED>
+(compat-defun mapcan (func sequence) ;; <OK>
   "Apply FUNC to each element of SEQUENCE.
 Concatenate the results by altering them (using `nconc').
 SEQUENCE may be a list, a vector, a boolean vector, or a string."
@@ -209,122 +209,122 @@ TRIM-LEFT and TRIM-RIGHT default to \"[ \\t\\n\\r]+\"."
     trim-right)
    trim-left))
 
-(compat-defun caaar (x) ;; <UNTESTED>
+(compat-defun caaar (x) ;; <OK>
   "Return the `car' of the `car' of the `car' of X."
   (declare (pure t))
   (car (car (car x))))
 
-(compat-defun caadr (x) ;; <UNTESTED>
+(compat-defun caadr (x) ;; <OK>
   "Return the `car' of the `car' of the `cdr' of X."
   (declare (pure t))
   (car (car (cdr x))))
 
-(compat-defun cadar (x) ;; <UNTESTED>
+(compat-defun cadar (x) ;; <OK>
   "Return the `car' of the `cdr' of the `car' of X."
   (declare (pure t))
   (car (cdr (car x))))
 
-(compat-defun caddr (x) ;; <UNTESTED>
+(compat-defun caddr (x) ;; <OK>
   "Return the `car' of the `cdr' of the `cdr' of X."
   (declare (pure t))
   (car (cdr (cdr x))))
 
-(compat-defun cdaar (x) ;; <UNTESTED>
+(compat-defun cdaar (x) ;; <OK>
   "Return the `cdr' of the `car' of the `car' of X."
   (declare (pure t))
   (cdr (car (car x))))
 
-(compat-defun cdadr (x) ;; <UNTESTED>
+(compat-defun cdadr (x) ;; <OK>
   "Return the `cdr' of the `car' of the `cdr' of X."
   (declare (pure t))
   (cdr (car (cdr x))))
 
-(compat-defun cddar (x) ;; <UNTESTED>
+(compat-defun cddar (x) ;; <OK>
   "Return the `cdr' of the `cdr' of the `car' of X."
   (declare (pure t))
   (cdr (cdr (car x))))
 
-(compat-defun cdddr (x) ;; <UNTESTED>
+(compat-defun cdddr (x) ;; <OK>
   "Return the `cdr' of the `cdr' of the `cdr' of X."
   (declare (pure t))
   (cdr (cdr (cdr x))))
 
-(compat-defun caaaar (x) ;; <UNTESTED>
+(compat-defun caaaar (x) ;; <OK>
   "Return the `car' of the `car' of the `car' of the `car' of X."
   (declare (pure t))
   (car (car (car (car x)))))
 
-(compat-defun caaadr (x) ;; <UNTESTED>
+(compat-defun caaadr (x) ;; <OK>
   "Return the `car' of the `car' of the `car' of the `cdr' of X."
   (declare (pure t))
   (car (car (car (cdr x)))))
 
-(compat-defun caadar (x) ;; <UNTESTED>
+(compat-defun caadar (x) ;; <OK>
   "Return the `car' of the `car' of the `cdr' of the `car' of X."
   (declare (pure t))
   (car (car (cdr (car x)))))
 
-(compat-defun caaddr (x) ;; <UNTESTED>
+(compat-defun caaddr (x) ;; <OK>
   "Return the `car' of the `car' of the `cdr' of the `cdr' of X."
   (declare (pure t))
   (car (car (cdr (cdr x)))))
 
-(compat-defun cadaar (x) ;; <UNTESTED>
+(compat-defun cadaar (x) ;; <OK>
   "Return the `car' of the `cdr' of the `car' of the `car' of X."
   (declare (pure t))
   (car (cdr (car (car x)))))
 
-(compat-defun cadadr (x) ;; <UNTESTED>
+(compat-defun cadadr (x) ;; <OK>
   "Return the `car' of the `cdr' of the `car' of the `cdr' of X."
   (declare (pure t))
   (car (cdr (car (cdr x)))))
 
-(compat-defun caddar (x) ;; <UNTESTED>
+(compat-defun caddar (x) ;; <OK>
   "Return the `car' of the `cdr' of the `cdr' of the `car' of X."
   (declare (pure t))
   (car (cdr (cdr (car x)))))
 
-(compat-defun cadddr (x) ;; <UNTESTED>
+(compat-defun cadddr (x) ;; <OK>
   "Return the `car' of the `cdr' of the `cdr' of the `cdr' of X."
   (declare (pure t))
   (car (cdr (cdr (cdr x)))))
 
-(compat-defun cdaaar (x) ;; <UNTESTED>
+(compat-defun cdaaar (x) ;; <OK>
   "Return the `cdr' of the `car' of the `car' of the `car' of X."
   (declare (pure t))
   (cdr (car (car (car x)))))
 
-(compat-defun cdaadr (x) ;; <UNTESTED>
+(compat-defun cdaadr (x) ;; <OK>
   "Return the `cdr' of the `car' of the `car' of the `cdr' of X."
   (declare (pure t))
   (cdr (car (car (cdr x)))))
 
-(compat-defun cdadar (x) ;; <UNTESTED>
+(compat-defun cdadar (x) ;; <OK>
   "Return the `cdr' of the `car' of the `cdr' of the `car' of X."
   (declare (pure t))
   (cdr (car (cdr (car x)))))
 
-(compat-defun cdaddr (x) ;; <UNTESTED>
+(compat-defun cdaddr (x) ;; <OK>
   "Return the `cdr' of the `car' of the `cdr' of the `cdr' of X."
   (declare (pure t))
   (cdr (car (cdr (cdr x)))))
 
-(compat-defun cddaar (x) ;; <UNTESTED>
+(compat-defun cddaar (x) ;; <OK>
   "Return the `cdr' of the `cdr' of the `car' of the `car' of X."
   (declare (pure t))
   (cdr (cdr (car (car x)))))
 
-(compat-defun cddadr (x) ;; <UNTESTED>
+(compat-defun cddadr (x) ;; <OK>
   "Return the `cdr' of the `cdr' of the `car' of the `cdr' of X."
   (declare (pure t))
   (cdr (cdr (car (cdr x)))))
 
-(compat-defun cdddar (x) ;; <UNTESTED>
+(compat-defun cdddar (x) ;; <OK>
   "Return the `cdr' of the `cdr' of the `cdr' of the `car' of X."
   (declare (pure t))
   (cdr (cdr (cdr (car x)))))
 
-(compat-defun cddddr (x) ;; <UNTESTED>
+(compat-defun cddddr (x) ;; <OK>
   "Return the `cdr' of the `cdr' of the `cdr' of the `cdr' of X."
   (declare (pure t))
   (cdr (cdr (cdr (cdr x)))))
@@ -341,7 +341,7 @@ PREFIX is a string, and defaults to \"g\"."
                      (1+ gensym-counter)))))
     (make-symbol (format "%s%d" (or prefix "g") num))))
 
-(compat-defmacro if-let* (varlist then &rest else)
+(compat-defmacro if-let* (varlist then &rest else) ;; <UNTESTED>
   "Bind variables according to VARLIST and evaluate THEN or ELSE.
 This is like `if-let' but doesn't handle a VARLIST of the form
 \(SYMBOL SOMETHING) specially."
@@ -359,7 +359,7 @@ This is like `if-let' but doesn't handle a VARLIST of the 
form
     `(let* ,(nreverse list)
        (if ,(caar list) ,then ,@else))))
 
-(compat-defmacro when-let* (varlist &rest body)
+(compat-defmacro when-let* (varlist &rest body) ;; <UNTESTED>
   "Bind variables according to VARLIST and conditionally evaluate BODY.
 This is like `when-let' but doesn't handle a VARLIST of the form
 \(SYMBOL SOMETHING) specially."
@@ -377,7 +377,7 @@ This is like `when-let' but doesn't handle a VARLIST of the 
form
     `(let* ,(nreverse list)
        (when ,(caar list) ,@body))))
 
-(compat-defmacro and-let* (varlist &rest body)
+(compat-defmacro and-let* (varlist &rest body) ;; <UNTESTED>
   "Bind variables according to VARLIST and conditionally evaluate BODY.
 Like `when-let*', except if BODY is empty and all the bindings
 are non-nil, then the result is non-nil."
diff --git a/compat-27.el b/compat-27.el
index 17d2d97834..c2bd7e20af 100644
--- a/compat-27.el
+++ b/compat-27.el
@@ -28,7 +28,7 @@
 
 ;;;; Defined in fns.c
 
-(compat-defun proper-list-p (object) ;; <UNTESTED>
+(compat-defun proper-list-p (object) ;; <OK>
   "Return OBJECT's length if it is a proper list, nil otherwise.
 A proper list is neither circular nor dotted (i.e., its last cdr
 is nil)."
@@ -39,7 +39,7 @@ is nil)."
     (wrong-type-argument nil)
     (circular-list nil)))
 
-(compat-defun proper-list-p (object) ;; <UNTESTED>
+(compat-defun proper-list-p (object) ;; <OK>
   "Return OBJECT's length if it is a proper list, nil otherwise.
 A proper list is neither circular nor dotted (i.e., its last cdr
 is nil)."
@@ -60,7 +60,7 @@ is nil)."
             (throw 'cycle nil)))
         (and (null hare) (length object))))))
 
-(compat-defun string-distance (string1 string2 &optional bytecompare) ;; 
<UNTESTED>
+(compat-defun string-distance (string1 string2 &optional bytecompare) ;; <OK>
   "Return Levenshtein distance between STRING1 and STRING2.
 The distance is the number of deletions, insertions, and substitutions
 required to transform STRING1 into STRING2.
@@ -365,7 +365,7 @@ where USER is a valid login name."
 
 ;;;; Defined in subr.el
 
-(compat-defmacro setq-local (&rest pairs)
+(compat-defmacro setq-local (&rest pairs) ;; <UNTESTED>
   "Handle multiple assignments."
   :explicit t
   (unless (zerop (mod (length pairs) 2))
@@ -380,7 +380,7 @@ where USER is a valid login name."
               body)))
     (cons 'progn (nreverse body))))
 
-(compat-defun provided-mode-derived-p (mode &rest modes) ;; <UNTESTED>
+(compat-defun provided-mode-derived-p (mode &rest modes) ;; <OK>
   "Non-nil if MODE is derived from one of MODES.
 Uses the `derived-mode-parent' property of the symbol to trace backwards.
 If you just want to check `major-mode', use `derived-mode-p'."
@@ -401,7 +401,7 @@ If you just want to check `major-mode', use 
`derived-mode-p'."
 Uses the `derived-mode-parent' property of the symbol to trace backwards."
   (apply #'provided-mode-derived-p major-mode modes))
 
-(compat-defmacro ignore-error (condition &rest body)
+(compat-defmacro ignore-error (condition &rest body) ;; <UNTESTED>
   "Execute BODY; if the error CONDITION occurs, return nil.
 Otherwise, return result of last form in BODY.
 
@@ -409,7 +409,7 @@ CONDITION can also be a list of error conditions."
   (declare (debug t) (indent 1))
   `(condition-case nil (progn ,@body) (,condition nil)))
 
-(compat-defmacro dolist-with-progress-reporter (spec reporter-or-message &rest 
body)
+(compat-defmacro dolist-with-progress-reporter (spec reporter-or-message &rest 
body) ;; <UNTESTED>
   "Loop over a list and report progress in the echo area.
 Evaluate BODY with VAR bound to each car from LIST, in turn.
 Then evaluate RESULT to get return value, default nil.
@@ -437,7 +437,7 @@ print the reporter message followed by the word \"done\".
        (progress-reporter-done ,prep)
        (or ,@(cdr (cdr spec)) nil))))
 
-(compat-defun flatten-tree (tree) ;; <UNTESTED>
+(compat-defun flatten-tree (tree) ;; <OK>
   "Return a \"flattened\" copy of TREE.
 In other words, return a list of the non-nil terminal nodes, or
 leaves, of the tree of cons cells rooted at TREE.  Leaves in the
@@ -455,7 +455,7 @@ returned list are in the same order as in TREE.
     (if tree (push tree elems))
     (nreverse elems)))
 
-(compat-defun xor (cond1 cond2) ;; <UNTESTED>
+(compat-defun xor (cond1 cond2) ;; <OK>
   "Return the boolean exclusive-or of COND1 and COND2.
 If only one of the arguments is non-nil, return it; otherwise
 return nil."
@@ -467,7 +467,7 @@ return nil."
   "Standard regexp guaranteed not to match any string at all."
   :constant t)
 
-(compat-defun assoc-delete-all (key alist &optional test) ;; <UNTESTED>
+(compat-defun assoc-delete-all (key alist &optional test) ;; <OK>
   "Delete from ALIST all elements whose car is KEY.
 Compare keys with TEST.  Defaults to `equal'.
 Return the modified alist.
@@ -538,7 +538,7 @@ the number of seconds east of Greenwich."
 
 ;;;; Defined in files.el
 
-(compat-defun file-size-human-readable (file-size &optional flavor space unit) 
;; <UNTESTED>
+(compat-defun file-size-human-readable (file-size &optional flavor space unit) 
;; <OK>
   "Handle the optional third and forth argument:
 
 Optional third argument SPACE is a string put between the number and unit.
diff --git a/compat-28.el b/compat-28.el
index 44f2209428..6947ad65ee 100644
--- a/compat-28.el
+++ b/compat-28.el
@@ -52,7 +52,7 @@ issues are inherited."
     (let ((case-fold-search nil))
       (string-match (regexp-quote needle) haystack start-pos))))
 
-(compat-defun length= (sequence length) ;; <UNTESTED>
+(compat-defun length= (sequence length) ;; <OK>
   "Returns non-nil if SEQUENCE has a length equal to LENGTH."
   (cond
    ((null sequence) (zerop length))
@@ -64,7 +64,7 @@ issues are inherited."
     (= (length sequence) length))
    ((signal 'wrong-type-argument sequence))))
 
-(compat-defun length< (sequence length) ;; <UNTESTED>
+(compat-defun length< (sequence length) ;; <OK>
   "Returns non-nil if SEQUENCE is shorter than LENGTH."
   (cond
    ((null sequence) (not (zerop length)))
@@ -74,7 +74,7 @@ issues are inherited."
     (< (length sequence) length))
    ((signal 'wrong-type-argument sequence))))
 
-(compat-defun length> (sequence length) ;; <UNTESTED>
+(compat-defun length> (sequence length) ;; <OK>
   "Returns non-nil if SEQUENCE is longer than LENGTH."
   (cond
    ((listp sequence)
@@ -105,7 +105,7 @@ inserted before contatenating."
 
 ;;;; Defined in alloc.c
 
-(compat-defun garbage-collect-maybe (_factor) ;; <UNTESTED>
+(compat-defun garbage-collect-maybe (_factor) ;; <OK>
   "Call ‘garbage-collect’ if enough allocation happened.
 FACTOR determines what \"enough\" means here: If FACTOR is a
 positive number N, it means to run GC if more than 1/Nth of the
@@ -393,7 +393,7 @@ Also see `local-variable-p'."
       (void-variable nil (throw 'fail nil)))
     t))
 
-(compat-defmacro with-existing-directory (&rest body)
+(compat-defmacro with-existing-directory (&rest body) ;; <UNTESTED>
   "Execute BODY with `default-directory' bound to an existing directory.
 If `default-directory' is already an existing directory, it's not changed."
   (declare (indent 0) (debug t))
@@ -410,7 +410,7 @@ If `default-directory' is already an existing directory, 
it's not changed."
            (throw ',quit (let ((default-directory dir))
                            ,@body)))))))
 
-(compat-defmacro dlet (binders &rest body)
+(compat-defmacro dlet (binders &rest body) ;; <UNTESTED>
   "Like `let' but using dynamic scoping."
   (declare (indent 1) (debug let))
   `(let (_)
@@ -491,7 +491,7 @@ the string."
       (substring string 0 -1)
     string))
 
-(compat-defmacro named-let (name bindings &rest body)
+(compat-defmacro named-let (name bindings &rest body) ;; <UNTESTED>
   "Looping construct taken from Scheme.
 Like `let', bind variables in BINDINGS and then evaluate BODY,
 but with the twist that BODY can evaluate itself recursively by
@@ -764,7 +764,7 @@ Other uses risk returning non-nil value that point to the 
wrong file."
 
 ;;;; Defined in env.el
 
-(compat-defmacro with-environment-variables (variables &rest body)
+(compat-defmacro with-environment-variables (variables &rest body) ;; 
<UNTESTED>
   "Set VARIABLES in the environent and execute BODY.
 VARIABLES is a list of variable settings of the form (VAR VALUE),
 where VAR is the name of the variable (a string) and VALUE
diff --git a/compat-29.el b/compat-29.el
index e143a43df0..f83ca5b6c4 100644
--- a/compat-29.el
+++ b/compat-29.el
@@ -106,7 +106,7 @@ 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 plist-get (plist prop &optional predicate) ;; <UNTESTED>
+(compat-defun plist-get (plist prop &optional predicate) ;; <OK>
   "Extract a value from a property list.
 PLIST is a property list, which is a list of the form
 \(PROP1 VALUE1 PROP2 VALUE2...).
@@ -125,7 +125,7 @@ This function doesn't signal an error if PLIST is invalid."
           (throw 'found (cadr plist)))
         (setq plist (cddr plist))))))
 
-(compat-defun plist-put (plist prop val &optional predicate) ;; <UNTESTED>
+(compat-defun plist-put (plist prop val &optional predicate) ;; <OK>
   "Change value in PLIST of PROP to VAL.
 PLIST is a property list, which is a list of the form
 \(PROP1 VALUE1 PROP2 VALUE2 ...).
@@ -148,7 +148,7 @@ The PLIST is modified by side effects."
           (setq tail (cddr tail))))
       (nconc plist (list prop val)))))
 
-(compat-defun plist-member (plist prop &optional predicate) ;; <UNTESTED>
+(compat-defun plist-member (plist prop &optional predicate) ;; <OK>
   "Return non-nil if PLIST has the property PROP.
 PLIST is a property list, which is a list of the form
 \(PROP1 VALUE1 PROP2 VALUE2 ...).
@@ -380,7 +380,7 @@ than this function."
       (insert string)
       (car (buffer-text-pixel-size nil nil t)))))
 
-(compat-defmacro with-buffer-unmodified-if-unchanged (&rest body)
+(compat-defmacro with-buffer-unmodified-if-unchanged (&rest body) ;; <UNTESTED>
   "Like `progn', but change buffer-modified status only if buffer text changes.
 If the buffer was unmodified before execution of BODY, and
 buffer text after execution of BODY is identical to what it was
@@ -458,7 +458,7 @@ this defaults to the current buffer."
           (put-text-property sub-start sub-end 'display disp)))
       (setq sub-start sub-end))))
 
-(compat-defmacro while-let (spec &rest body)
+(compat-defmacro while-let (spec &rest body) ;; <UNTESTED>
   "Bind variables according to SPEC and conditionally evaluate BODY.
 Evaluate each binding in turn, stopping if a binding value is nil.
 If all bindings are non-nil, eval BODY and repeat.
@@ -976,7 +976,7 @@ should be a MENU form as accepted by `easy-menu-define'.
               (keymap-set keymap key def)))))
       keymap)))
 
-(compat-defmacro defvar-keymap (variable-name &rest defs)
+(compat-defmacro defvar-keymap (variable-name &rest defs) ;; <UNTESTED>
   "Define VARIABLE-NAME as a variable with a keymap definition.
 See `define-keymap' for an explanation of the keywords and KEY/DEFINITION.
 
diff --git a/compat-macs.el b/compat-macs.el
index 56b2457ca2..1bd9c1cb09 100644
--- a/compat-macs.el
+++ b/compat-macs.el
@@ -207,7 +207,7 @@ If this is not documented on yourself system, you can check 
\
        `(not (fboundp ',name)))
      rest)))
 
-(defmacro compat-defun (name arglist docstring &rest rest) ;; <UNTESTED>
+(defmacro compat-defun (name arglist docstring &rest rest)
   "Define NAME with arguments ARGLIST as a compatibility function.
 The function must be documented in DOCSTRING.  REST may begin
 with a plist, that is interpreted by the macro but not passed on
diff --git a/compat-tests.el b/compat-tests.el
index 454819d5d5..2812838c3f 100644
--- a/compat-tests.el
+++ b/compat-tests.el
@@ -46,13 +46,26 @@
 (defmacro should-equal (a b)
   `(should (equal ,a ,b)))
 
-(ert-deftest compat-call ()
+(ert-deftest plist-get ()
+  (let (list)
+    (setq list (compat-call plist-put list 'first 1))
+    (setq list (compat-call plist-put list 'second 2))
+    (setq list (compat-call plist-put list 'first 10))
+    (should (eq (compat-call plist-get list 'first) 10))
+    (should (eq (compat-call plist-get list 'second) 2))
+    (should (compat-call plist-member list 'first))
+    (should-not (compat-call plist-member list 'third)))
   (let (list)
     (setq list (compat-call plist-put list "first" 1 #'string=))
     (setq list (compat-call plist-put list "second" 2 #'string=))
     (setq list (compat-call plist-put list "first" 10 #'string=))
     (should (eq (compat-call plist-get list "first" #'string=) 10))
-    (should (eq (compat-call plist-get list "second" #'string=) 2))))
+    (should (eq (compat-call plist-get list "second" #'string=) 2))
+    (should (compat-call plist-member list "first" #'string=))
+    (should-not (compat-call plist-member list "third" #'string=))))
+
+(ert-deftest garbage-collect-maybe ()
+  (garbage-collect-maybe 10))
 
 (ert-deftest insert-into-buffer ()
   ;; Without optional compat--arguments



reply via email to

[Prev in Thread] Current Thread [Next in Thread]