Function: persist-equal

persist-equal is a byte-compiled function defined in persist.el.

Signature

(persist-equal A B)

Documentation

Return non-nil when the values of A and B are equal.

A and B are compared using equal unless they are both hash tables. In that case, the following are compared:

- hash table count
- hash table predicate
- values, using persist-equal

Source Code

;; Defined in ~/.emacs.d/elpa/persist-0.8/persist.el
(defun persist-equal (a b)
  "Return non-nil when the values of A and B are equal.
A and B are compared using `equal' unless they are both hash
tables.  In that case, the following are compared:

- hash table count
- hash table predicate
- values, using `persist-equal'"
  (if (and (hash-table-p a) (hash-table-p b))
      (and (= (hash-table-count a) (hash-table-count b))
           (eq (hash-table-test a) (hash-table-test b))
           (catch 'done
             (maphash
              (lambda (key a-value)
                (unless (persist-equal a-value (gethash key b (not a-value)))
                  (throw 'done nil)))
              a)
             t))
    (equal a b)))