                                                      buffer-2 nil nil)
                           0)))))))))
 
-;; This polyfill needs to be defined before using it as type to prevent errors
-;; during compilation.
-(defalias 'elisp/ert/proper--list-p
-  (if (fboundp 'proper-list-p) 'proper-list-p 'format-proper-list-p))
-
 (defun elisp/ert/sanitize--xml (tree)
   "Return a sanitized version of the XML TREE."
   ;; This is necessary because ‘xml-print’ sometimes generates invalid XML,

                                                 index nil nil))
       branches))
    (`(,(or 'condition-case 'condition-case-unless-debug)
       ,_var ,bodyform . ,(and (pred elisp/ert/proper--list-p) clauses))
     ;; Similar to the ‘cond’ case, but here we have one branch for each handler
     ;; as well as one branch for a successful exit.
     (let ((branches (make-vector (1+ (length clauses)) nil)))

         ;; branch frequency vector and attach it to DATA.
         (when-let ((branches (elisp/ert/instrument--branches vector form)))
           (setf (elisp/ert/coverage--data-branches data) branches))))
      ((pred proper-list-p)
       ;; Use ‘dolist’ where possible to avoid deep recursion.
       (dolist (element form)
         (elisp/ert/instrument--form seen vector element)))
