      (eq (elisp-def--namespace-at-point)
          'variable))))
 
-(defun elisp-def--find-use (form sym &optional quoted)
-  "Is SYM being used as a function, a variable, or a quoted
-symbol in FORM?
+;; TODO: handle declarations, which aren't usages at all.
+;; (let ((FOO ...))) or (lambda (FOO) ...)
+(defun elisp-def--use-position (form sym &optional quoted)
+  "Is SYM being used as a function, a global variable, or a
+quoted symbol in FORM?
 
 Assumes FORM has been macro-expanded."
   (cond

    (let* ((src (elisp-def--source-with-placeholder))
           (form (read src))
           (expanded-form (macroexpand-all form))
           (use (elisp-def--find-use expanded-form 'elisp-def--placeholder)))
      use)))

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

      (if quoted 'quoted 'function))
     ;; See if this is a quoted form that contains SYM.
     ((eq (car form) 'quote)
      (--any (elisp-def--use-position it sym t) (cdr form)))
     ;; Recurse on the form to see if any arguments contain SYM.
     (t
      (--any (elisp-def--use-position it sym quoted) form))))
   ((vectorp form)
    ;; All elements in a vector are quoted.
    (--any (elisp-def--use-position it sym t)
           (mapcar #'identity form)))))

(ert-deftest elisp-def--use-position ()
  (should
   (eq (elisp-def--use-position '(foo bar) 'foo)
       'function))
  (should
   (eq (elisp-def--use-position '(foo bar) 'bar)
       'variable))
  (should
   (eq (elisp-def--use-position [foo] 'foo)
       'quoted))
  (should
   (eq (elisp-def--use-position '(foo '(bar)) 'bar)
       'quoted))
  (should
   (eq (elisp-def--use-position '(let ((foo (bar)))) 'bar)
       'function)))

(defun elisp-def--source-with-placeholder ()
