title: Why does a macro that uses "let" expand differently from one that doesn't?
body: <p>I am new to Lisp and I am reading through Doug Hoyte's Let Over Lambda and he presents Paul Graham's <code>nif</code> macro in Chapter 3.  I was playing around with that and made these two macros:</p>
  
  <pre><code>(defmacro niffy (expr pos zero neg)
    `(cond ((plusp ,expr) ,pos)
           ((zerop ,expr) ,zero)
           (t ,neg)))
  
  (defmacro niffy2 (expr pos zero neg)
    `(let ((x ,expr))
       (cond ((plusp x) ,pos)
             ((zerop x) ,zero
              (t ,neg)))))
  </code></pre>
  
  <p>When I do <code>(macroexpand '(niffy2 10 "positive" "zero" "negative"))</code>, I get what I expect: <code>(LET ((X 10)) (COND ((PLUSP X) "positive") ((ZEROP X) "zero" (T "negative"))))</code></p>
  
  <p>But when I do <code>(macroexpand '(niffy 10 "positive" "zero" "negative"))</code> I just get the evaluated form <code>"positive"</code>.  Which confuses me because in <code>niffy</code>, <code>cond</code> is backquoted, so I thought that meant it wouldn't be evaluated.  Evaluating both <code>niffy</code> and <code>niffy2</code> without the macro expansion both work exactly as I expect, returning "positive", "zero", and "negative" for positive, zero, and negative values respectively.</p>