 ;;; =====
 ;;; Rtags uses the following files:
 ;;; `~/.rtags' (created automatically)
-;;;     Index files which are reloaded when `rdm' restarts.
+;;;     Where rdm stores its index files. They are reloaded when it restarts.
 ;;; `~/.rdmrc' (optional)
 ;;;     Config file for rdm (see rdm.cpp) containing default command line args.
 ;;; `compile_commands.json' (optional, located in project root dir)

      (when (yes-or-no-p
             (format "Wrote compile_commands.json (%d files). Load it?" num-files))
        (rtags-call-rc :path t :output nil "-J" dir)
        ("Done (check rdm's logs).")))))

;; Mode for compile_includes


                                       "compile_includes")))
    (cond ((file-exists-p compile-includes-file)
           ;; Parse the file and return 3 lists: src, include, exclude
           (let ((directives (rtags-load-compile-includes-file-content
                              compile-includes-file)))
             (setq *rtags-project-source-dirs*  ()
                   *rtags-project-include-dirs* ())
             (let ((source-dirs (first directives))
                   (incl-dirs   (second directives))
                   (excl-regexs (third directives)))
               ;; Scan src to get all subdirs that do not match the excludes
               (dolist (path source-dirs)
                 (setq path (expand-file-name path *rtags-compile-includes-base-dir*))
                 (message "Scanning source dir: %s" path)
                 (setq *rtags-project-source-dirs*
                       (append *rtags-project-source-dirs*
                               (rtags-scan-include-directories path excl-regexs))))
               ;; Same with includes
               (dolist (path incl-dirs)
                 (setq path (expand-file-name path *rtags-compile-includes-base-dir*))
                 (message "Scanning include dir: %s" path)
                 (setq *rtags-project-include-dirs*
                       (append *rtags-project-include-dirs*
