 MODES should be one symbol or a list of them, representing major or minor modes.
 This will overwrite backends for MODES on consecutive uses.
 
-If BACKENDS is just 'nil, unset the backends for MODES.
+If the car of BACKENDS is nil, unset the backends for MODES.
 
 Examples:
 

    '(:separate company-irony-c-headers company-irony))
  (set-company-backend! 'sh-mode nil)"
  (dolist (mode (doom-enlist modes))
    (let ((fn (intern (format "+company|init-%s" mode)))
          (hook (intern (format "%s-hook" mode))))
      (cond ((and backends (not (eq (car backends) 'nil)))
             (fset fn
                   (lambda ()
                     (when (or (eq major-mode mode)
                               (and (boundp mode) (symbol-value mode)))

                       (dolist (backend (reverse backends))
                         (cl-pushnew backend company-backends
                                     :test (if (symbolp backend) #'eq #'equal))))))
             (add-hook hook fn))))))

;; FIXME obsolete :company-backend
;;;###autoload
