Commit 216c9e8e authored by levente.meszaros's avatar levente.meszaros
Browse files

Use equal as a test function in def constant by default.

Ignore-this: b28c43f55dad597f7eec65d35bc980d1

darcs-hash:03068131c1b9470ef6b0cf7c28fa167fce7e18c4
parent 6c9e58e9
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -144,9 +144,9 @@ like #'eq and 'eq."
                           under ~S.~:@>" name old new test)))))))

(def (definer e :available-flags "e") constant (name initial-value &optional documentation)
  "Use like: (def (constant e :test #'string=) alma \"korte\")"
  "Use like: (def (constant e :test #'string=) alma \"korte\") test defaults to equal."
  (check-type name symbol)
  (bind ((test (getf -options- :test ''eql)))
  (bind ((test (getf -options- :test ''equal)))
    (with-standard-definer-options name
      `(eval-when (:compile-toplevel :load-toplevel :execute)
         (defconstant ,name (%reevaluate-constant ',name ,initial-value :test ,test)