(if (member* element (symbol-value list-var)
:test (or compare-fn #'equal))
instead? Or for efficiency (does that ever matter here?)
;; member and memq are implemented in C
(if (cond ((eq compare-fn #'eq) (memq element (symbol-value list-var)))
((null compare-fn) (member element (symbol-value list-var)))
((member* element (symbol-value list-var) :test compare-fn)))
Do we have any use cases for :test functions other than member?