             (-last-item items)))))
 
 (defun elisp-def--bound-syms (form sym &optional accum)
-  "Return a list of bound symbols around the symbol XXX in FORM.
+  "Return a list of bound symbols around the symbol SYM in FORM.
 
 Assumes FORM has been fully macro-expanded."
   (catch 'done

    (search-forward "bar")
    (should
     (eq (elisp-def--namespace-at-point)
         'variable))))

;; TODO: handle declarations, which aren't usages at all.
;; (let ((FOO ...))) or (lambda (FOO) ...)

    ;; symbol is used.
    (let* ((src (elisp-def--source-with-placeholder))
           (form (read src))
           ;; TODO: what if SYM disappears after expanding? E.g. inside rx.
           (expanded-form (macroexpand-all form))
           (use (elisp-def--use-position expanded-form 'elisp-def--placeholder)))
      ;; If it's being used as a variable, see if it's let-bound.
      (when (eq use 'variable)
        (let* ((sym (symbol-at-point))
               (bound-syms (elisp-def--bound-syms
                            ;; TODO: factor out the placeholder symbol.
                            expanded-form 'elisp-def--placeholder)))
          (when (memq sym bound-syms)
            (setq use 'bound))))
      use)))

(ert-deftest elisp-def--namespace-at-point ()
