      ((eq (car form) sym)
       ;; Function call for the symbol we're looking for.
       (if quoted 'quoted 'function))
+     ;; Explicit call to `require'.
+     ((and (eq (car form) 'require)
+           (equal (car-safe (cdr form)) `(quote ,sym)))
+      'library)
      ;; See if this is a quoted form that contains SYM.
      ((eq (car form) 'quote)
       (--any (elisp-def--use-position it sym t) (cdr form)))

          (and (stringp filename)
               (equal (file-name-extension filename) "c"))))))

(defun elisp-def--find-global (sym callable-p)
  "Find the buffer and position where SYM is globally defined."
  (let ((primitive-p (elisp-def--primitive-p sym callable-p))
        (path nil)
        (buf nil)
        (pos nil))
    (when callable-p
      (-let [(base-sym . src-path) (find-function-library sym)]
        ;; `base-sym' is the underlying symbol if `sym' is an alias.
        (setq sym base-sym)
        (setq path src-path)))
    (when (and primitive-p path find-function-C-source-directory)
      ;; Convert "src/foo.c" to "".
      (setq path (f-expand path
                           (f-parent find-function-C-source-directory))))

    (cond
     ((and callable-p path)
      ;; Convert foo.elc to foo.el.
      (-when-let (src-path (elisp-def--find-library-name path))
        ;; Open `path' ourselves, so we can widen before searching.


    (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
