                           (car edebug-info)
                         edebug-info)]
           (setq buf (marker-buffer marker))
-          (setq pos (marker-position marker)))))
-     ((not callable-p)
-      (condition-case nil
-          (-let [(sym-buf . sym-pos) (find-definition-noselect sym 'defvar)]
-            (setq buf sym-buf)
-            (setq pos sym-pos))
-        (search-failed nil)
-        ;; If your current Emacs instance doesn't match the source
-        ;; code configured in find-function-C-source-directory, we can
-        ;; get an error about not finding source. Try
-        ;; `default-tab-width' against Emacs trunk.
-        (error nil))))
+          (setq pos (marker-position marker))))))
+    (list buf pos)))
+
+(defun elisp-def--find-variable (sym)
+  "Find the buffer and position where variable SYM is defined."
+  (let (buf pos)
+    (condition-case nil
+        (-let [(sym-buf . sym-pos) (find-definition-noselect sym 'defvar)]
+          (setq buf sym-buf)
+          (setq pos sym-pos))
+      (search-failed nil)
+      ;; If your current Emacs instance doesn't match the source
+      ;; code configured in find-function-C-source-directory, we can
+      ;; get an error about not finding source. Try
+      ;; `default-tab-width' against Emacs trunk.
+      (error nil))
     (list buf pos)))
 
 (defun elisp-def--defined-in (sym)

    (overlay-put overlay 'face 'highlight)
    (run-with-timer 0.5 nil 'delete-overlay overlay)))

(defun elisp-def--find-library-name (path)
  "A wrapper around `find-library-name' that returns nil if PATH
has no library with that name.

This can happen when users have installed Emacs without its
source code: they have e.g. org.elc but no org.el."
  (condition-case nil
      (find-library-name path)
    (error nil)))

(defun elisp-def--primitive-p (sym callable-p)


    (should
     (eq (elisp-def--namespace-at-point)
         'bound)))
  ;; Quoted references.
  (with-temp-buffer
    (insert "(foo 'bar)")

    (goto-char (point-min))
    (search-forward "bar")

    (should
     (eq (elisp-def--namespace-at-point)
         'quoted)))
  ;; Handle references to libraries.
  (with-temp-buffer
    (insert "(require 'foo)")

    (goto-char (point-min))
    (search-forward "foo")

    (should
     (eq (elisp-def--namespace-at-point)
         'library))))

;; 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, a
library/feature, or a quoted symbol in FORM?

Assumes FORM has been macro-expanded."
  (cond
