 
 (when exordium-rtags-cmake
   (setq rtags-autostart-diagnostics t)
-  (exordium-enable-rtags-cmake-mode))
+  (exordium-toggle-rtags-cmake-mode))
+
 (provide 'init-rtags-cmake)

                (c++-mode))))
          (exordium-rtags-cmake-index-project-maybe project-dir))))))

(defun exordium-enable-rtags-cmake-mode ()
  "Enable rtags-cmake-mode for C/C++ buffers."
  (add-hook 'c-mode-hook   #'rtags-cmake-mode)
  (add-hook 'c++-mode-hook #'rtags-cmake-mode))

;;; Find the (CMake) project root directory


  pair is (project-dir . build-dir). Note that the build-dir
  contains the compilation database.")

(defvar exordium-rtags-cmake-mode-enabled nil
  "Whether cmake mode is enabled")

(define-minor-mode rtags-cmake-mode
  "Minor mode for using RTags with zero-configuration, for CMake
enabled projects."
