                  (string-match "\\.eprof$" root-file)
                  (not (string-equal root-dir
                                     (profile-current-get 'project-root-dir))))
-        ;; apparently this is a new profile not yet loaded into the path
+        ;; apparently this is a new profile not yet initialized
         (load-file root-file)
         ;; todo: this doesn't work; when remote, project-root-dir is
         ;; absolute, and abbreviate-file-name doesn't transform remote

    (before before-find-file-noselect-1 activate)
  "Set the buffer local variable `profile-current' right after the creation
of the buffer."
  (with-current-buffer buf
    (make-local-variable 'profile-current)
    (put 'profile-current 'permanent-local t)
    (setq profile-current

(defun profile-set-include-files ()
  "Set useful include file settings for use in programming modes,
according to the current profile."
  (profile-current-put 'include-files
                       (profile-collect-include-files
                        (profile-current-get 'ctags-alist)))
  (profile-current-put 'include-ff-files
                       ;; ff-search-directories doesn't need a trailing
                       ;; slash
                       (mapcar 'directory-file-name
                               (profile-collect-include-files
                                (profile-current-get 'ctags-alist) t)))
  )

;;;###autoload
(defun profile-collect-grep-dirs ()
