j14i/cl-macros huggingface dataset:
Write a Common Lisp macro to handle this code pattern:
(with-open-temporary-file (f :keep t) (pathname f))

Problem: Macro call that should be transformed by with-open-temporary-file

Macro definition:
(defmacro with-open-temporary-file ((stream &rest args &key keep &allow-other-keys) &body body)
  "Create a temporary file using OPEN-TEMPORARY with ARGS and run BODY
  with STREAM bound to the temporary file stream.  Returns the values
  returned by BODY.  By default, the file is deleted when BODY is
  exited. If a true value is passed in KEEP, the file is not deleted
  when the body is exited.  See OPEN-TEMPORARY for more permitted
  options."
  `(with-open-stream (,stream (open-temporary ,@(alexandria:remove-from-plist args :keep)))
     #+sbcl
     (declare (sb-ext:muffle-conditions sb-ext:code-deletion-note))
     ,(if (and (constantp keep)
               keep)
          `(progn ,@body)
          `(unwind-protect
                (progn ,@body)
             (unless ,keep
               (close ,stream)
               (delete-file (pathname ,stream)))))))

Macroexpansion:
(with-open-stream (f (open-temporary)) (declare (sb-ext:muffle-conditions sb-ext:code-deletion-note)) (progn (pathname f)))
You are a Common Lisp macro expert. Given this code pattern:
(some->> nil :key nil)

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

Macro definition:
(defmacro SOME->> ...)

Macroexpansion:
(let* ((#:|some123| nil)
       (#:|some123| (when #:|some123| (:key #:|some123|)))
       (#:|some123| (when #:|some123| (#:|some123|))))
  #:|some123|)
You are a Common Lisp macro expert. Given this code pattern:
(defun-compile-time expand-local-setq (pairs environment) (if (null pairs) '(progn) (let ((d (gensym "DUMMY-"))) `(let ((,d ,(first pairs))) (trail #'(lambda () (setq ,(first pairs) ,d))) ,@(if (null (rest (rest pairs))) (list `(setq ,(first pairs) ,(perform-substitutions (second pairs) environment))) (list `(setq ,(first pairs) ,(perform-substitutions (second pairs) environment)) (expand-local-setq (rest (rest pairs)) environment)))))))

Write a macro that addresses: Macro call that should be transformed by defun-compile-time

Macro definition:
(defmacro defun-compile-time (function-name lambda-list &body body)
  `(eval-when (:compile-toplevel :load-toplevel :execute)
     (cl:defun ,function-name ,lambda-list ,@body)
     (eval-when (:compile-toplevel) (compile ',function-name))))

Macroexpansion:
(eval-when (:compile-toplevel :load-toplevel :execute) (common-lisp:defun expand-local-setq (pairs environment) (if (null pairs) (quote (progn)) (let ((d (gensym "DUMMY-"))) (sb-int:quasiquote (let ((#S(sb-impl::comma :expr d :kind 0) #S(sb-impl::comma :expr (first pairs) :kind 0))) (trail (function (lambda nil (setq #S(sb-impl::comma :expr (first pairs) :kind 0) #S(sb-impl::comma :expr d :kind 0))))) #S(sb-impl::comma :expr (if (null (rest (rest pairs))) (list (sb-int:quasiquote (setq #S(sb-impl::comma :expr (first pairs) :kind 0) #S(sb-impl::comma :expr (perform-substitutions (second pairs) environment) :kind 0)))) (list (sb-int:quasiquote (setq #S(sb-impl::comma :expr (first pairs) :kind 0) #S(sb-impl::comma :expr (perform-substitutions (second pairs) environment) :kind 0))) (expand-local-setq (rest (rest pairs)) environment))) :kind 2)))))) (eval-when (:compile-toplevel) (compile (quote expand-local-setq))))
You are a Common Lisp macro expert. Given this code pattern:
(lambda () nil)

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

Macro definition:
(defmacro LAMBDA ...)

Macroexpansion:
#'(lambda () nil)
Generate a defmacro form that transforms code like this:
(resolving
  nil
  (progn))

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

Macro definition:
(defmacro RESOLVING ...)

Macroexpansion:
(resolve
  nil
  (progn))
Write a Common Lisp macro to handle this code pattern:
(with-decoder-simple-clos-semantics (is (equal-objects-p (make-instance 'frob :bar 46 :quux 98) (decode-json-from-string (format nil input "{\"lispPackage\":\"jsonTest\", \"lispClass\":\"frob\"}")))) (finalize-inheritance (find-class 'foo)) (finalize-inheritance (find-class 'goo)) (is (equal-objects-p (json:make-object '((bar . 46) (xyzzy . t) (quux . 98)) nil '(foo goo)) (decode-json-from-string (format nil input "{\"lispSuperclasses\": [\"foo\", \"goo\"], \"lispPackage\":\"jsonTest\"}")))) (is (typep (prototype (decode-json-from-string (format nil input "{\"lispPackage\":\"jsonTest\", \"lispClass\":\"pFrob\"}"))) 'prototype)) (is (equalp '((bar . 46) (xyzzy . t) (quux . 98)) (decode-json-from-string (format nil input "{\"lispClass\": \"cons\", \"lispPackage\":\"jsonTest\"}")))) (is (loop with ht = (decode-json-from-string (format nil input "{\"lispClass\": \"hashTable\", \"lispPackage\":\"jsonTest\"}")) initially (if (/= (hash-table-count ht) 3) (return nil)) for k being each hash-key of ht using (hash-value v) always (case k (bar (eql v 46)) (xyzzy (eql v t)) (quux (eql v 98)) (t nil)))))

Problem: Macro call that should be transformed by with-decoder-simple-clos-semantics

Macro definition:
(defmacro with-decoder-simple-clos-semantics (&body body)
  "Execute BODY in a dynamic environement where the decoder semantics
is such as set by SET-DECODER-SIMPLE-CLOS-SEMANTICS."
  `(with-shadowed-custom-vars
     (set-decoder-simple-clos-semantics)
     ,@body))

Macroexpansion:
(with-shadowed-custom-vars (set-decoder-simple-clos-semantics) (is (equal-objects-p (make-instance (quote frob) :bar 46 :quux 98) (decode-json-from-string (format nil input "{\"lispPackage\":\"jsonTest\", \"lispClass\":\"frob\"}")))) (finalize-inheritance (find-class (quote foo))) (finalize-inheritance (find-class (quote goo))) (is (equal-objects-p (make-object (quote ((bar . 46) (xyzzy . t) (quux . 98))) nil (quote (foo goo))) (decode-json-from-string (format nil input "{\"lispSuperclasses\": [\"foo\", \"goo\"], \"lispPackage\":\"jsonTest\"}")))) (is (typep (prototype (decode-json-from-string (format nil input "{\"lispPackage\":\"jsonTest\", \"lispClass\":\"pFrob\"}"))) (quote prototype))) (is (equalp (quote ((bar . 46) (xyzzy . t) (quux . 98))) (decode-json-from-string (format nil input "{\"lispClass\": \"cons\", \"lispPackage\":\"jsonTest\"}")))) (is (loop with ht = (decode-json-from-string (format nil input "{\"lispClass\": \"hashTable\", \"lispPackage\":\"jsonTest\"}")) initially (if (/= (hash-table-count ht) 3) (return nil)) for k being each hash-key of ht using (hash-value v) always (case k (bar (eql v 46)) (xyzzy (eql v t)) (quux (eql v 98)) (t nil)))))
Create a Common Lisp macro for the following transformation. Before code:
(action (:after node-lisp node bound-variables) (when (loop :for (_ . coalton-var) :in (node-lisp-vars node) :thereis (and (eq name coalton-var) (not (member name bound-variables :test #'eq)))) (setf unsafe? t)) (values))

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

Macro definition:
(defmacro action ((when type &rest args) &body body)
  "Construct an action block, turning `body` into a lambda function
accepting `args` if `args` are provided. If there are no `args`, then
`body` is assumed to be a function object and is used directly with
`when` and `type` to create an `action` instance. Otherwise, the first
argument in `args` is declared to be a node of type `type`, and the
`args` and `body` are used to generate a lambda function."
  (check-type when keyword)
  (check-type type symbol)
  (assert (subtypep type 'node))
  (assert (or (not (endp args)) (= 1 (length body))))
  (if (endp args)
      `(make-action ',when ',type ,@body)
      `(make-action ',when ',type
                    (lambda (,@args)
                      (declare (type ,type ,(first args)))
                      ,@body))))

Macroexpansion:
(make-action (quote :after) (quote node-lisp) (lambda (node bound-variables) (declare (type node-lisp node)) (when (loop :for (_ . coalton-var) :in (node-lisp-vars node) :thereis (and (eq name coalton-var) (not (member name bound-variables :test (function eq))))) (setf unsafe? t)) (values)))
You are a Common Lisp macro expert. Given this code pattern:
(when (find (first x) (list 'flag)) (let ((s (short x)) (l (long x))) (if s (push s flags-short)) (if l (push l flags-long))))

Write a macro that addresses: 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 (find (first x) (list (quote flag))) (let ((s (short x)) (l (long x))) (if s (push s flags-short)) (if l (push l flags-long))))
Define a macro that eliminates this repetitive pattern:
(deferror "57014" query-canceled operator-intervention)

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 query-canceled (operator-intervention) nil) (setf (gethash "57014" *error-table*) (quote query-canceled)))
You are a Common Lisp macro expert. Given this code pattern:
;; Manual dispatch by keyword with multiple lambdas is repetitive
(let ((count 0))
  (setf (symbol-function 'counter)
        (lambda (&rest args)
          (case (car args)
            (:inc (apply (lambda (n) (incf count n)) (cdr args)))
            (:dec (apply (lambda (n) (decf count n)) (cdr args)))
            (:reset (progn (setf count 0) nil))
            (t (error "Unknown: ~a" (car args)))))))

;; Every method: keyword, lambda wrapper, arg destructuring - repetitive

Write a macro that addresses: Repeated keyword-dispatch with automatic argument destructuring — each keyword maps to a lambda with its own parameter list

Macro definition:
(defmacro! dlambda (&rest ds)
  `(lambda (&rest ,g!args)
     (case (car ,g!args)
       ,@(mapcar
           (lambda (d)
             `(,(if (eq t (car d))
                  t
                  (list (car d)))
               (apply (lambda ,@(cdr d))
                      ,(if (eq t (car d))
                         g!args
                         `(cdr ,g!args)))))
           ds))))

Macroexpansion:
;; (dlambda
;;   (:inc (n) (incf count n))
;;   (:dec (n) (decf count n))
;;   (:reset () (setf count 0))
;;   (t (&rest args) (format t "Unknown: ~a~%" args)))
;;
;; Expands to a single lambda with case dispatch.
;; Each method has its own destructured argument list.
;; t as the key provides a default/catch-all.
Write a Common Lisp macro to handle this code pattern:
(def-dynenv-var nil (progn))

Problem: Macro call that should be transformed by DEF-DYNENV-VAR

Macro definition:
(defmacro DEF-DYNENV-VAR ...)

Macroexpansion:
(eval-when (:compile-toplevel :load-toplevel :execute)
  (defvar #:nil173 (load-time-value (progn)))
  (setf (get 'nil 'dynenv-var) '#:nil173)
  (define-symbol-macro nil (get-dynenv-var 'nil)))
Define a macro that eliminates this repetitive pattern:
(-> :g ((a (n) b c (d e f))) (put (list a n b c d e f)))

Issue: Macro call that should be transformed by ->

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

Macroexpansion:
(atomically :g ((a (n) b c (d e f))) (put (list a n b c d e f)))
Create a Common Lisp macro for the following transformation. Before code:
(deftag dynamic-tag (body attrs &key name) (unless name (error "No tag name")) (let ((empty? (null body)) (thunk (gensym (string 'dynamic-tag-thunk))) (attrs (escape-attrs nil attrs))) `(prog1 nil (flet ((,thunk () ,@(loop for expr in body collect `(catch-output ,expr)))) (declare (dynamic-extent #',thunk)) (dynamic-tag* ,name (list ,@attrs) #',thunk ,empty?)))))

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

Macro definition:
(defmacro deftag (name (body attrs-var &rest ll) &body tag)
  "Define NAME as a tag.
If NAME is not a keyword, it will also be defined as a macro with an
implicit `with-html'."
  (let ((definer
          (if (keywordp name)
              'deftag/keyword
              'deftag/macro)))
    `(,definer ,name (,body ,attrs-var ,@ll) ,@tag)))

Macroexpansion:
(deftag/macro dynamic-tag (body attrs &key name) (unless name (error "No tag name")) (let ((empty? (null body)) (thunk (gensym (string (quote dynamic-tag-thunk)))) (attrs (escape-attrs nil attrs))) (sb-int:quasiquote (prog1 nil (flet ((#S(sb-impl::comma :expr thunk :kind 0) nil #S(sb-impl::comma :expr (loop for expr in body collect (sb-int:quasiquote (catch-output #S(sb-impl::comma :expr expr :kind 0)))) :kind 2))) (declare (dynamic-extent (function #S(sb-impl::comma :expr thunk :kind 0)))) (dynamic-tag* #S(sb-impl::comma :expr name :kind 0) (list #S(sb-impl::comma :expr attrs :kind 2)) (function #S(sb-impl::comma :expr thunk :kind 0)) #S(sb-impl::comma :expr empty? :kind 0)))))))
Write a Common Lisp macro to handle this code pattern:
(some->
  nil
  (progn))

Problem: Macro call that should be transformed by SOME->

Macro definition:
(defmacro SOME-> ...)

Macroexpansion:
(let* ((#:var171 nil)
       (#:var172
        (if #:var171
            (progn #:var171)
            nil)))
  #:var172)
Define a macro that eliminates this repetitive pattern:
(c-assert (listp old-kids))

Issue: Macro call that should be transformed by c-assert

Macro definition:
(defmacro c-assert (assertion &optional places fmt$ &rest fmt-args)
  (declare (ignorable assertion places fmt$ fmt-args))
   #+(or)`(progn) 
  `(unless *stop*
     (unless ,assertion
       ,(if fmt$
            `(c-break ,fmt$ ,@fmt-args)
          `(c-break "failed assertion: ~a" ',assertion)))))

Macroexpansion:
(unless *stop* (unless (listp old-kids) (c-break "failed assertion: ~a" (quote (listp old-kids)))))
You are a Common Lisp macro expert. Given this code pattern:
(continue-whopper)

Write a macro that addresses: Macro call that should be transformed by CONTINUE-WHOPPER

Macro definition:
(defmacro CONTINUE-WHOPPER ...)

Macroexpansion:
(call-next-method-fn self class-env inst-env mcs%caller mcs%next-methods
                     mcs%args)
Write a Common Lisp macro to handle this code pattern:
(reduced-typecase nil)

Problem: Macro call that should be transformed by REDUCED-TYPECASE

Macro definition:
(defmacro REDUCED-TYPECASE ...)

Macroexpansion:
(typecase nil)
Create a Common Lisp macro for the following transformation. Before code:
(defsynonym there-is :there-is)

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

Macro definition:
(defmacro defsynonym (symbol synonym)
  "Set SYNONYM for a SYMBOL. "
  `(eval-always
     (setf (get ',symbol 'synonym) ',synonym)))

Macroexpansion:
(eval-always (setf (get (quote there-is) (quote synonym)) (quote :there-is)))
Generate a defmacro form that transforms code like this:
(do+ inner-loop (do+ (terminate outer-loop 3)))

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 inner-loop (do+ (terminate outer-loop 3)))
You are a Common Lisp macro expert. Given this code pattern:
(iterate:declare-variables)

Write a macro that addresses: 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:
(declare-variables)
You are a Common Lisp macro expert. Given this code pattern:
(bind ((#(a nil c) #(1 2 3))) (list a c))

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

Macro definition:
(defmacro bind ((&rest bindings) &body body)
  "Bind is a replacement for let*, destructuring-bind, multiple-value-bind and more. 

An example is probably the best way to describe its syntax:

    \(bind \(\(a 2\)
           \(\(b &rest args &key \(c 2\) &allow-other-keys\) '\(:a :c 5 :d 10 :e 54\)\)
           \(\(:values d e\) \(truncate 4.5\)\)
           \(\(:structure xxx- slot1 slot2\) \(make-xxx\)\)
           \(\(:flet name \(arg1 arg2\)\) \(+ arg1 arg2\)\)\)
         \(list a b c d e args\)\)

Simple bindings are as in let*. Destructuring is done if the first item
in a binding is a list. Multiple value binding is done if the first item
in a binding is a list and the first item in the list is ':values'. Other
forms have their own syntax. For example, :structure first has the conc
name and then slot names whereas :flet has the function name and a list
of arguments and then the function body (in an implicit progn)."
  (let (declarations)
    (loop while (and (consp (car body)) (eq (caar body) 'declare)) do
          (push (first body) declarations)
          (setf body (rest body)))
    (if bindings
	(let ((*all-declarations* (bind-expand-declarations (nreverse declarations))))
	  (prog1
	      (bind-macro-helper bindings body)
	    (check-for-unused-variable-declarations *all-declarations*)))
        `(locally
             ,@declarations
           ,@body))))

Macroexpansion:
(let* ((#:|values-168| #(1 2 3)) (a (aref #:|values-168| 0)) (c (aref #:|values-168| 2))) (declare (ignorable #:|values-168|)) (progn (list a c)))
Create a Common Lisp macro for the following transformation. Before code:
(defsynonym finish :finish)

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

Macro definition:
(defmacro defsynonym (symbol synonym)
  "Set SYNONYM for a SYMBOL. "
  `(eval-always
     (setf (get ',symbol 'synonym) ',synonym)))

Macroexpansion:
(eval-always (setf (get (quote finish) (quote synonym)) (quote :finish)))
Write a Common Lisp macro to handle this code pattern:
(define-error multi-val-bind-mismatch () (bindings val-form return-set) "Multiple Value Bind - Number of values returned from value form does not match bindings: Bindings: ~a Value Form: ~a Returned Values: ~a" bindings val-form (map 'list #'type->type-spec return-set))

Problem: 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 multi-val-bind-mismatch (:error-type varjo-error :prefix "Varjo") (bindings val-form return-set) "Multiple Value Bind - Number of values returned from value form does not match bindings: Bindings: ~a Value Form: ~a Returned Values: ~a" bindings val-form (map (quote list) (function type->type-spec) return-set))
Generate a defmacro form that transforms code like this:
(with-open-temporary-file (f :keep nil))

Pattern to recognize: Macro call that should be transformed by with-open-temporary-file

Macro definition:
(defmacro with-open-temporary-file ((stream &rest args &key keep &allow-other-keys) &body body)
  "Create a temporary file using OPEN-TEMPORARY with ARGS and run BODY
  with STREAM bound to the temporary file stream.  Returns the values
  returned by BODY.  By default, the file is deleted when BODY is
  exited. If a true value is passed in KEEP, the file is not deleted
  when the body is exited.  See OPEN-TEMPORARY for more permitted
  options."
  `(with-open-stream (,stream (open-temporary ,@(alexandria:remove-from-plist args :keep)))
     #+sbcl
     (declare (sb-ext:muffle-conditions sb-ext:code-deletion-note))
     ,(if (and (constantp keep)
               keep)
          `(progn ,@body)
          `(unwind-protect
                (progn ,@body)
             (unless ,keep
               (close ,stream)
               (delete-file (pathname ,stream)))))))

Macroexpansion:
(with-open-stream (f (open-temporary)) (declare (sb-ext:muffle-conditions sb-ext:code-deletion-note)) (unwind-protect (progn) (unless nil (close f) (delete-file (pathname f)))))
Create a Common Lisp macro for the following transformation. Before code:
(dynamic-relet* nil
  :key
  nil)

What needs to change: Macro call that should be transformed by DYNAMIC-RELET*

Macro definition:
(defmacro DYNAMIC-RELET* ...)

Macroexpansion:
(progn :key nil)
Define a macro that eliminates this repetitive pattern:
(with-symbol-access
  nil
  :key
  nil)

Issue: Macro call that should be transformed by WITH-SYMBOL-ACCESS

Macro definition:
(defmacro WITH-SYMBOL-ACCESS ...)

Macroexpansion:
(let ((*symbol-access* t))
  nil
  :key
  nil)
Define a macro that eliminates this repetitive pattern:
(defun/1 log10 (x) (log x 10))

Issue: Macro call that should be transformed by defun/1

Macro definition:
(defmacro defun/1 (name arglist &body body)
  "Lisp-1 defun; makes function pointers work."
  `(progn
     (defun ,name ,arglist
       (declare (optimize (speed 0) (debug 3)
                          ;; FIXME: Why do minor warnings result in load errors?
                          #+sbcl (sb-ext:inhibit-warnings 3)))
        
       ,@body)
     (defparameter ,name (vacietis.c:mkptr& (symbol-function ',name)))))

Macroexpansion:
(progn (defun log10 (x) (declare (optimize (speed 0) (debug 3) (sb-ext:inhibit-warnings 3))) (log x 10)) (defparameter log10 (vacietis.c:mkptr& (symbol-function (quote log10)))))
Generate a defmacro form that transforms code like this:
(cond-<>
  nil
  nil)

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

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

Macroexpansion:
(let* ((#:var134 nil)
       (#:var135
        (if nil
            (-<>
              #:var134)
            #:var134)))
  #:var135)