j14i/cl-macros huggingface dataset:
Create a Common Lisp macro for the following transformation. Before code:
(define-simple-definition-resolver special-operator special-operator-p)

What needs to change: Macro call that should be transformed by define-simple-definition-resolver

Macro definition:
(defmacro define-simple-definition-resolver (class lookup-function &body body)
  (let ((package (gensym "PACKAGE")))
    `(define-definition-resolver ,class (,class ,package)
       (when (ignore-errors ,(if body
                                 `(let ((,(first lookup-function) ,class))
                                    ,@body)
                                 `(,lookup-function ,class)))
         (list (make-instance ',class :designator ,class :package ,package))))))

Macroexpansion:
(define-definition-resolver special-operator (special-operator #:package131) (when (ignore-errors (special-operator-p special-operator)) (list (make-instance (quote special-operator) :designator special-operator :package #:package131))))
You are a Common Lisp macro expert. Given this code pattern:
(newq nil nil)

Write a macro that addresses: Macro call that should be transformed by NEWQ

Macro definition:
(defmacro NEWQ ...)

Macroexpansion:
(new 'nil nil)
Create a Common Lisp macro for the following transformation. Before code:
(when shared `(make-node ,shared))

What needs to change: Macro call that should be transformed by when

Macro definition:
(defmacro when (test &body forms)
  `(if ,test
	   ,(cl:if (cadr forms)
			   `(progn ,@forms)
			   (car forms))))

Macroexpansion:
(if shared (sb-int:quasiquote (make-node #S(sb-impl::comma :expr shared :kind 0))))
Write a Common Lisp macro to handle this code pattern:
(case nil (progn))

Problem: Macro call that should be transformed by CASE

Macro definition:
(defmacro CASE ...)

Macroexpansion:
(let ((#:nil nil))
  (declare (ignorable #:nil))
  (cond ((eql #:nil 'progn) nil)))
Define a macro that eliminates this repetitive pattern:
(with-html-string (:link :rel :stylesheet))

Issue: Macro call that should be transformed by with-html

Macro definition:
(defmacro with-html (&body body &environment env)
  "Interpret BODY as HTML. Consult README.txt for the syntax."
  `(let ((*html* (ensure-html-stream *html*)))
     ,(if (and (null (cdr body)) (atom (car body)))
          (car body)
          `(progn ,@(parse-html body env)))))

Macroexpansion:
(with-output-to-string (*html*) (with-html (:link :rel :stylesheet)))
Define a macro that eliminates this repetitive pattern:
(-> :p (a) (+ a 1))

Issue: Macro call that should be transformed by ->

Macro definition:
(defmacro -> (invariant &body args)
  "See flow:atomically"
  `(atomically ,invariant ,@args))

Macroexpansion:
(atomically :p (a) (+ a 1))
Define a macro that eliminates this repetitive pattern:
(with-yield (loop for line = (read-line stream nil 'eof) until (eq line 'eof) do (yield line)))

Issue: Macro call that should be transformed by with-yield

Macro definition:
(defmacro with-yield (&body body)
  (let ((point (gensym))
        (current (gensym)))
    `(let (,point ,current)
       (with-call/cc
	 (labels ((yield (&rest values)
		    (setf ,current values)
		    (let/cc k
		      (setf ,point k))))
	   ,@body
	   (setf ,point nil)))
       (gen-lambda ()
	 (cond ((null ,point)
		'generator-stop)
	       (t
		(let ((current ,current))
		  (funcall ,point nil)
		  ;values-handler: see gen-lambda
		  (apply #'values (funcall values-handler current)))))))))

Macroexpansion:
(let (#:g135 #:g136) (with-call/cc (labels ((yield (&rest values) (setf #:g136 values) (let/cc k (setf #:g135 k)))) (loop for line = (read-line stream nil (quote eof)) until (eq line (quote eof)) do (yield line)) (setf #:g135 nil))) (gen-lambda nil (cond ((null #:g135) (quote generator-stop)) (t (let ((current #:g136)) (funcall #:g135 nil) (apply (function values) (funcall values-handler current)))))))
Define a macro that eliminates this repetitive pattern:
(of-type symbol 'foo)

Issue: Macro call that should be transformed by of-type

Macro definition:
(defmacro of-type (type form &optional description &rest format-args)
  `(eval-in-context
    *context*
    (make-instance 'comparison-result
                   :expression '(of-type ,type ,form)
                   :value-form ',form
                   :body (lambda () ,form)
                   :expected ',(maybe-unquote type)
                   :comparison 'typep
                   ,@(when description
                       `(:description (format NIL ,description ,@format-args))))))

Macroexpansion:
(eval-in-context *context* (make-instance (quote comparison-result) :expression (quote (of-type symbol (quote foo))) :value-form (quote (quote foo)) :body (lambda nil (quote foo)) :expected (quote symbol) :comparison (quote typep)))
Define a macro that eliminates this repetitive pattern:
(ematch0 more (nil nil) ((list* gen sub more) (let ((newsub (correct-pattern sub))) (list* gen newsub (let ((*lexvars* (append (variables newsub) *lexvars*))) (%correct-more-patterns more))))))

Issue: Macro call that should be transformed by ematch0

Macro definition:
(defmacro ematch0 (what &body clauses)
  `(match0 ,what
     ,@clauses
     (_ (error "level0 match error!"))))

Macroexpansion:
(match0 more (nil nil) ((list* gen sub more) (let ((newsub (correct-pattern sub))) (list* gen newsub (let ((*lexvars* (append (variables newsub) *lexvars*))) (%correct-more-patterns more))))) (_ (error "level0 match error!")))
You are a Common Lisp macro expert. Given this code pattern:
(with-form-fields (name) form (print (field-value name)))

Write a macro that addresses: Macro call that should be transformed by with-form

Macro definition:
(defmacro with-form (form &body body)
  "Bind *FORM* to FORM and evaluate BODY in that context."
  `(call-with-form ,form (lambda () ,@body)))

Macroexpansion:
(let ((name (get-field form (quote name)))) (print (field-value name)))
Create a Common Lisp macro for the following transformation. Before code:
(define-error no-version-in-context () (env) "No supported version found in context:~%~a" (v-context env))

What needs to change: Macro call that should be transformed by define-error

Macro definition:
(defmacro define-error (name (&key (error-type 'varjo-error) (prefix "Varjo"))
                            (&rest args) error-string &body body)
  `(defcondition ,name (:error-type ,error-type :prefix ,prefix) ,args
       ,error-string ,@body))

Macroexpansion:
(defcondition no-version-in-context (:error-type varjo-error :prefix "Varjo") (env) "No supported version found in context:~%~a" (v-context env))
Create a Common Lisp macro for the following transformation. Before code:
(with-wcs-math-error-handling ((quot rem) (ftruncate x y)) (check-wcs-math-result) rem)

What needs to change: Macro call that should be transformed by with-wcs-math-error-handling

Macro definition:
(defmacro with-wcs-math-error-handling
    ((var-or-var-list
      (function x &optional (y nil y-supplied-p))
      &rest keyargs
      &key underflow-value)
     &body body)
  (declare (ignorable underflow-value))
  (let ((x_ (gensym)) (y_ (gensym)) (args_ (gensym))
        (var-list (ensure-list var-or-var-list)))
    `(let* ((,x_ ,x)
            (,y_ ,y)
            (,args_ (list ,x_ ,@(if y-supplied-p `(,y_)))))
       (declare (ignorable ,y_)
                (type list ,args_)
                (dynamic-extent ,args_))
       (catch 'return-from-with-wcs-math-error-handling
         (multiple-value-bind ,var-list
             (call-with-wcs-math-error-handler ',function ,args_
                                               ,@keyargs)
           (flet ((check-wcs-math-result
                      (&optional (ret ,(first var-list))
                                 (arg-list ,args_))
                    (check-wcs-math-result ret arg-list)))
             ,@body))))))

Macroexpansion:
(let* ((#:g254 x) (#:g255 y) (#:g256 (list #:g254 #:g255))) (declare (ignorable #:g255) (type list #:g256) (dynamic-extent #:g256)) (catch (quote return-from-with-wcs-math-error-handling) (multiple-value-bind (quot rem) (call-with-wcs-math-error-handler (quote ftruncate) #:g256) (flet ((check-wcs-math-result (&optional (ret quot) (arg-list #:g256)) (check-wcs-math-result ret arg-list))) (check-wcs-math-result) rem))))
You are a Common Lisp macro expert. Given this code pattern:
(keep-bops nil :key nil)

Write a macro that addresses: Macro call that should be transformed by KEEP-BOPS

Macro definition:
(defmacro KEEP-BOPS ...)

Macroexpansion:
(eval-when (:load-toplevel :compile-toplevel :execute)
  (progn
   (init-binfix)
   (unless nil
     (setq *binfix*
             (delete nil
                     (mapcar
                      (lambda (bs)
                        (setq bs
                                (delete-if
                                 (lambda (b)
                                   (unless (member (car b) '(nil :key nil))
                                     (remprop (car b) 'properties)
                                     t))
                                 bs)))
                      *binfix*)))
     (assign-properties))))
Create a Common Lisp macro for the following transformation. Before code:
($ "value-1" 610)

What needs to change: Macro call that should be transformed by $

Macro definition:
(defmacro $ (&rest args)
  `(kv ,@args))

Macroexpansion:
(kv "value-1" 610)
Generate a defmacro form that transforms code like this:
(cond-<>)

Pattern to recognize: Macro call that should be transformed by COND-<>

Macro definition:
(defmacro COND-<> ...)

Macroexpansion:
nil
Generate a defmacro form that transforms code like this:
($> "l" -900)

Pattern to recognize: Macro call that should be transformed by $>

Macro definition:
(defmacro $> (&rest args)
  `($op "$gt" ,@args))

Macroexpansion:
($op "$gt" "l" -900)
Write a Common Lisp macro to handle this code pattern:
(without-dependency-capture)

Problem: Macro call that should be transformed by WITHOUT-DEPENDENCY-CAPTURE

Macro definition:
(defmacro WITHOUT-DEPENDENCY-CAPTURE ...)

Macroexpansion:
(let ((%dependent% nil)))
Generate a defmacro form that transforms code like this:
(do+ (options :atomic-updates nil) (for k (in '(a b c d e))) (for x (across #(1 2 3 4) :index index)) (returning (list x k :index index)))

Pattern to recognize: Macro call that should be transformed by do+

Macro definition:
(defmacro do+ (&body body)
  "High-level, extensible iteration construct. Refer to the manual for syntax and semantics."
  `(do+/internal nil ,@body))

Macroexpansion:
(do+/internal nil (options :atomic-updates nil) (for k (in (quote (a b c d e)))) (for x (across #(1 2 3 4) :index index)) (returning (list x k :index index)))
You are a Common Lisp macro expert. Given this code pattern:
(enable-readtime-wrapper-syntax)

Write a macro that addresses: Macro call that should be transformed by ENABLE-READTIME-WRAPPER-SYNTAX

Macro definition:
(defmacro ENABLE-READTIME-WRAPPER-SYNTAX ...)

Macroexpansion:
(eval-when (:compile-toplevel :execute)
  (setf *readtable* (copy-readtable *readtable*))
  (set-readtime-wrapper-syntax-in-readtable #\LEFT_CURLY_BRACKET
                                            #\RIGHT_CURLY_BRACKET)
  (values))
Define a macro that eliminates this repetitive pattern:
(defhandler sb-int:named-lambda (named-lambda name lambda-list &rest body) `(list* ',named-lambda ,(apply 'dump-fbinding name lambda-list body)))

Issue: Macro call that should be transformed by defhandler

Macro definition:
(defmacro defhandler (symbol lambda-list &body body)
  (let ((syms (force-list symbol)))
    (let ((func (intern (format nil "~A~A" 'hander- (first syms)))))
      `(progn
         (defun ,func ,lambda-list
           ,@body)
         (setf
          ,@(loop for sym in syms
               collect `(gethash ',sym *form-handler*)
               collect `',func))))))

Macroexpansion:
(progn (defun hander-named-lambda (named-lambda name lambda-list &rest body) (sb-int:quasiquote (list* (quote #S(sb-impl::comma :expr named-lambda :kind 0)) #S(sb-impl::comma :expr (apply (quote dump-fbinding) name lambda-list body) :kind 0)))) (setf (gethash (quote sb-int:named-lambda) *form-handler*) (quote hander-named-lambda)))
Define a macro that eliminates this repetitive pattern:
(member (first tree) stop-on :test #'eq)

Issue: Macro call that should be transformed by m

Macro definition:
(defmacro m (form &environment *env*)
  (e form))

Macroexpansion:
(member (first tree) stop-on :test (function eq))
Define a macro that eliminates this repetitive pattern:
(deferror "08006" connection-failure)

Issue: Macro call that should be transformed by deferror

Macro definition:
(defmacro deferror (code typename &optional (superclass 'database-error))
  `(progn (define-condition ,typename (,superclass) ())
          (setf (gethash ,code *error-table*) ',typename)))

Macroexpansion:
(progn (define-condition connection-failure (database-error) nil) (setf (gethash "08006" *error-table*) (quote connection-failure)))
Create a Common Lisp macro for the following transformation. Before code:
(defsynonym nil (progn))

What needs to change: Macro call that should be transformed by DEFSYNONYM

Macro definition:
(defmacro DEFSYNONYM ...)

Macroexpansion:
(eval-when (:compile-toplevel :load-toplevel :execute)
  (setf (get 'nil 'iterate::synonym) '(progn)))
Write a Common Lisp macro to handle this code pattern:
(assert-values ("assert fresh initialization") (foo 'nothing) (foo+1 'nothing) (bar 'nothing) (bar-1 'nothing))

Problem: Macro call that should be transformed by assert-values

Macro definition:
(defmacro assert-values ((desc) &body objects-and-values)
  `(progn
     (trc ,desc)
     ,@(loop for (obj val) in objects-and-values
	    collect `(assert (eql (value ,obj) ,val)))))

Macroexpansion:
(progn (trc "assert fresh initialization") (assert (eql (value foo) (quote nothing))) (assert (eql (value foo+1) (quote nothing))) (assert (eql (value bar) (quote nothing))) (assert (eql (value bar-1) (quote nothing))))
Create a Common Lisp macro for the following transformation. Before code:
(iterate:display-iterate-clauses)

What needs to change: Macro call that should be transformed by iter

Macro definition:
(defmacro iter (&body body &environment env)
  "Jonathan Amsterdam's powerful and extensible iteration facility,
providing multiple accumulation, generators, memory of previous
iterations, over 50 clauses to start with and a Lisp-like syntax.
Evaluate (iterate:display-iterate-clauses) for an overview of clauses"
  (let* ((*env* env)
	 (*result-var* (genvar 'result))
	 (*type-alist* nil)
	 (*declare-variables* *always-declare-variables*)
	 (*bindings* nil)
	 (*internal-variables* nil)
	 (*previous-vars-alist* nil)
	 (*declarations* nil)
	 (*loop-body-wrappers* nil)
	 (*accum-var-alist* nil)
	 (*shared-bindings-alist* nil)
	 (*top-level?* t)
	 (*binding-context?* nil)
	 (*temps* nil)
	 (*temps-in-use* nil)
	 (*driver-info-alist* nil)
	 (*loop-name* (if (symbolp (car body))
			  (car body)
			  (gensym "ITERATE")))
	 (*block-name* (if (symbolp (car body))
			   (pop body)
			   nil))
	 (*loop-top* (symbol-append 'loop-top- *block-name*))
	 (*loop-step* (symbol-append 'loop-step- *block-name*))
	 (*loop-end* (symbol-append 'loop-end- *block-name*))
	 (*loop-step-used?* nil)
	 (*loop-end-used?* nil))
    (process-top-level-decls body)
    (multiple-value-bind (body decls init-code steppers final-code final-prot)
	(walk-list body)
      (multiple-value-bind (init step)
	  (insert-previous-code)
	(augment init-code init)
	(augment steppers step))
      (prepend (default-driver-code) body)
      (let* ((it-bod `(block ,*loop-name*
			(tagbody
			  (progn ,.init-code)
			  ,*loop-top*
			  (progn ,.body)
			  ,.(if *loop-step-used?* (list *loop-step*))
			  (progn ,.steppers)
			  (go ,*loop-top*)
			  ,.(if *loop-end-used?* (list *loop-end*))
			  (progn ,.final-code))
			,(if (member *result-var* *bindings* :key #'car)
			   *result-var*
			   nil)))
	     (it-bod (if (eql *block-name* nil)
			 `(block nil ,it-bod)
			 it-bod)))
	(wrap-form *loop-body-wrappers*
		   `(let* ,(nreverse *bindings*)
		     ,.(if *declarations*
			   `((declare .,*declarations*)))
		     ,.decls
		     ,(if final-prot
			  `(unwind-protect ,it-bod .,final-prot)
			  it-bod)))))))

Macroexpansion:
(display-iterate-clauses)
Generate a defmacro form that transforms code like this:
(define-modf-function aref 1 (new-val array &rest idx) (let ((new-arr (alexandria:copy-array array))) (setf (apply #'aref new-arr idx) new-val) new-arr))

Pattern to recognize: Macro call that should be transformed by define-modf-function

Macro definition:
(defmacro define-modf-function (name nth-arg (new-val &rest args) &body body)
  "Define a new modf function.  It inverts NAME forms by modifying the NTH-ARG
term of the arguments of the place form in the MODF macro."
  ;; Side effect in a macro, I know.  How can you do this via EVAL-WHEN if I
  ;; want it to run even if not a toplevel macro?
  (setf (gethash name *modf-nth-arg*)
        nth-arg)
  `(progn
     (eval-when (:compile-toplevel :load-toplevel :execute)
       (setf (gethash ',name *modf-nth-arg*)
             ,nth-arg))
     (defun ,(intern (modf-name name) :modf) (,new-val ,@args)
       ,@body)))

Macroexpansion:
(progn (eval-when (:compile-toplevel :load-toplevel :execute) (setf (gethash (quote aref) *modf-nth-arg*) 1)) (defun |BUILDER:COMMON-LISP:AREF| (new-val array &rest idx) (let ((new-arr (alexandria:copy-array array))) (setf (apply (function aref) new-arr idx) new-val) new-arr)))
Write a Common Lisp macro to handle this code pattern:
(with-packages-unlocked nil
  :key
  nil)

Problem: Macro call that should be transformed by WITH-PACKAGES-UNLOCKED

Macro definition:
(defmacro WITH-PACKAGES-UNLOCKED ...)

Macroexpansion:
(let ((#:|packages123| (locked-packages 'nil)))
  (unlock-packages #:|packages123|)
  (unwind-protect :key nil (lock-packages #:|packages123|)))
Create a Common Lisp macro for the following transformation. Before code:
(defclause across (vector &rest args &key index start end by) "Synonym for in-vector." (declare (ignore index start end by)) `(in-vector ,vector ,@args))

What needs to change: Macro call that should be transformed by defclause

Macro definition:
(defmacro defclause (name arglist &body body)
  "Same as cl:defmacro, but additionally records <name> in *clauses* as a known clause macro."
  `(progn
     (defmacro ,name ,arglist ,@body)
     (pushnew ',name *clauses*)))

Macroexpansion:
(progn (defmacro across (vector &rest args &key index start end by) "Synonym for in-vector." (declare (ignore index start end by)) (sb-int:quasiquote (in-vector #S(sb-impl::comma :expr vector :kind 0) #S(sb-impl::comma :expr args :kind 2)))) (pushnew (quote across) *clauses*))
Create a Common Lisp macro for the following transformation. Before code:
(define-value-binding ranging ((var (if ascending (- from by) (+ from by))) from to &key (by 1) &aux (ascending (< from to))) (declare (type real var from to by) (type boolean ascending)) (declare (ignore from)) `(cond (,ascending (incf ,var ,by) (when (< ,to ,var) (end-for))) (T (decf ,var ,by) (when (< ,var ,to) (end-for)))))

What needs to change: Macro call that should be transformed by define-value-binding

Macro definition:
(defmacro define-value-binding (name (var &rest args) &body body)
  (let ((vars (lambda-fiddle:extract-lambda-vars (lambda-fiddle:remove-aux-part args))))
    (emit-binding-definition name var args body :extra-vars vars)))

Macroexpansion:
(define-direct-binding ranging (var from to &key (by 1)) (let ((#:ascending171 (gensym #A((9) base-char . "ASCENDING"))) (#:from168 (gensym #A((4) base-char . "FROM"))) (#:to169 (gensym #A((2) base-char . "TO"))) (#:by170 (gensym #A((2) base-char . "BY")))) (values* (sb-int:quasiquote (with-interleaving (let* #S(sb-impl::comma :expr (list* (list #:from168 from) (list #:to169 to) (list #:by170 by) (list #:ascending171 (list (quote <) #:from168 #:to169)) (loop for #:var167 in (lambda-fiddle:extract-lambda-vars (enlist var)) collect (list #:var167 (list (quote if) #:ascending171 (list (quote -) #:from168 #:by170) (list (quote +) #:from168 #:by170))))) :kind 0) (declare (ignorable #S(sb-impl::comma :expr #:ascending171 :kind 0) #S(sb-impl::comma :expr #:from168 :kind 0) #S(sb-impl::comma :expr #:to169 :kind 0) #S(sb-impl::comma :expr #:by170 :kind 0))) #S(sb-impl::comma :expr (sb-int:quasiquote (declare (type #S(sb-impl::comma :expr (quote real) :kind 0) #S(sb-impl::comma :expr var :kind 0)))) :kind 0) #S(sb-impl::comma :expr (sb-int:quasiquote (declare (type #S(sb-impl::comma :expr (quote real) :kind 0) #S(sb-impl::comma :expr #:from168 :kind 0)))) :kind 0) #S(sb-impl::comma :expr (sb-int:quasiquote (declare (type #S(sb-impl::comma :expr (quote real) :kind 0) #S(sb-impl::comma :expr #:to169 :kind 0)))) :kind 0) #S(sb-impl::comma :expr (sb-int:quasiquote (declare (type #S(sb-impl::comma :expr (quote real) :kind 0) #S(sb-impl::comma :expr #:by170 :kind 0)))) :kind 0) #S(sb-impl::comma :expr (sb-int:quasiquote (declare (type #S(sb-impl::comma :expr (quote boolean) :kind 0) #S(sb-impl::comma :expr #:ascending171 :kind 0)))) :kind 0)) #S(sb-impl::comma :expr nil :kind 0))) (let ((ascending #:ascending171) (from #:from168) (to #:to169) (by #:by170)) (declare (ignorable ascending from to by)) (declare (ignore from)) (sb-int:quasiquote (cond (#S(sb-impl::comma :expr ascending :kind 0) (incf #S(sb-impl::comma :expr var :kind 0) #S(sb-impl::comma :expr by :kind 0)) (when (< #S(sb-impl::comma :expr to :kind 0) #S(sb-impl::comma :expr var :kind 0)) (end-for))) (t (decf #S(sb-impl::comma :expr var :kind 0) #S(sb-impl::comma :expr by :kind 0)) (when (< #S(sb-impl::comma :expr var :kind 0) #S(sb-impl::comma :expr to :kind 0)) (end-for)))))))))
You are a Common Lisp macro expert. Given this code pattern:
(as->* 'some-name)

Write a macro that addresses: Macro call that should be transformed by AS->*

Macro definition:
(defmacro AS->* ...)

Macroexpansion:
(as-> 'some-name)
You are a Common Lisp macro expert. Given this code pattern:
(with-html-string (:li (:div :class "status col-xs-2 col-md-1" (:span :class "text-success" (:a :href "https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#200" 200)))))

Write a macro that addresses: Macro call that should be transformed by with-html

Macro definition:
(defmacro with-html (&body body &environment env)
  "Interpret BODY as HTML. Consult README.txt for the syntax."
  `(let ((*html* (ensure-html-stream *html*)))
     ,(if (and (null (cdr body)) (atom (car body)))
          (car body)
          `(progn ,@(parse-html body env)))))

Macroexpansion:
(with-output-to-string (*html*) (with-html (:li (:div :class "status col-xs-2 col-md-1" (:span :class "text-success" (:a :href "https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#200" 200))))))
Generate a defmacro form that transforms code like this:
(iterate
  'some-name)

Pattern to recognize: Macro call that should be transformed by ITERATE

Macro definition:
(defmacro ITERATE ...)

Macroexpansion:
(iter
  'some-name)
Generate a defmacro form that transforms code like this:
(define-error if-form-type-mismatch () (test-form then-form then-type else-form else-type) "The result if ~a is true is ~a which has type ~a however the false case returns ~a which has type ~a This is incompatible" test-form then-form then-type else-form else-type)

Pattern to recognize: Macro call that should be transformed by define-error

Macro definition:
(defmacro define-error (name (&key (error-type 'varjo-error) (prefix "Varjo"))
                            (&rest args) error-string &body body)
  `(defcondition ,name (:error-type ,error-type :prefix ,prefix) ,args
       ,error-string ,@body))

Macroexpansion:
(defcondition if-form-type-mismatch (:error-type varjo-error :prefix "Varjo") (test-form then-form then-type else-form else-type) "The result if ~a is true is ~a which has type ~a however the false case returns ~a which has type ~a This is incompatible" test-form then-form then-type else-form else-type)
Create a Common Lisp macro for the following transformation. Before code:
(define-declaration nil
    nil)

What needs to change: Macro call that should be transformed by DEFINE-DECLARATION

Macro definition:
(defmacro DEFINE-DECLARATION ...)

Macroexpansion:
(sb-cltl2:define-declaration nil
    nil)