 
 ;; Enable ElDoc when editing Lisps and using Lisp REPLs.
 
-(dolist (hook '(emacs-lisp-mode-hook
-                lisp-interaction-mode-hook))
-  (add-hook hook (lambda () (eldoc-mode 1))))
+(add-hook 'emacs-lisp-mode-hook #'eldoc-mode)
+(add-hook 'lisp-interaction-mode-hook #'eldoc-mode)
 
 (when (radian-package-enabled-p 'clojure-mode)
-  (add-hook 'cider-mode-hook (lambda () (eldoc-mode 1))))
+  (add-hook 'cider-mode-hook #'eldoc-mode))
 
 (when (radian-package-enabled-p 'cider)
-  (add-hook 'cider-repl-mode-hook (lambda () (eldoc-mode 1))))
+  (add-hook 'cider-repl-mode-hook #'eldoc-mode))
 
 ;; Show ElDoc messages in the echo area immediately, instead of after
 ;; 1/2 a second.

  ;; company-irony seems to only be able to work in a single buffer.
  ;;
  ;; [1]: https://github.com/Sarcasm/irony-mode
  (add-hook 'irony-mode-hook 'irony-cdb-autosetup-compile-options)

  ;; Automatically install irony-server if it is missing. irony-server
  ;; is necessary for Irony to work at all!

  ;; Tell Company about company-irony. For some reason, this appears
  ;; to cause Irony to be eagerly loaded. So we only do it after Irony
  ;; has been loaded.

  (defun radian--set-up-company-irony ()
    ;; Don't add `company-irony' as a backend if we have
    ;; already added `company-irony-c-headers'. The backend
    ;; for `company-irony-c-headers' is a grouped backend,
    ;; so it accounts for both, and if we add
    ;; `company-irony' it will take precedence and inhibit
    ;; the functionality of `company-irony-c-headers'.
    (unless (member '(company-irony-c-headers
                      company-irony)
                    company-backends)
      (add-to-list 'company-backends 'company-irony)))

  (add-hook 'irony-mode-hook #'radian--set-up-company-irony))

;; Extends company-irony to work for completing #includes.
(use-package company-irony-c-headers
