Skip to content

Commit

Permalink
Rename projectile-cache-projects-find-file-hook to projectile-track-k…
Browse files Browse the repository at this point in the history
…nown-projects-find-file-hook
  • Loading branch information
bbatsov committed Oct 5, 2016
1 parent bfd8071 commit 9c3aa2f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions projectile.el
Original file line number Diff line number Diff line change
Expand Up @@ -741,7 +741,7 @@ The cache is created both in memory and on the hard drive."
(not (projectile-ignored-project-p project-root)))
(projectile-cache-current-file))))

(defun projectile-cache-projects-find-file-hook ()
(defun projectile-track-known-projects-find-file-hook ()
"Function for caching projects with `find-file-hook'."
(when (and projectile-track-known-projects-automatically (projectile-project-p))
(let ((known-projects (and (sequencep projectile-known-projects)
Expand Down Expand Up @@ -3339,7 +3339,7 @@ entirely."
"Called by `find-file-hook' when `projectile-mode' is on."
(unless (file-remote-p default-directory)
(projectile-cache-files-find-file-hook)
(projectile-cache-projects-find-file-hook)
(projectile-track-known-projects-find-file-hook)
(projectile-visit-project-tags-table)))

;;;###autoload
Expand Down Expand Up @@ -3368,13 +3368,13 @@ Otherwise behave as if called interactively.
(or (projectile-unserialize projectile-cache-file)
(make-hash-table :test 'equal))))
(add-hook 'find-file-hook 'projectile-find-file-hook-function)
(add-hook 'projectile-find-dir-hook #'projectile-cache-projects-find-file-hook t)
(add-hook 'dired-before-readin-hook #'projectile-cache-projects-find-file-hook t t)
(add-hook 'projectile-find-dir-hook #'projectile-track-known-projects-find-file-hook t)
(add-hook 'dired-before-readin-hook #'projectile-track-known-projects-find-file-hook t t)
(ad-activate 'compilation-find-file)
(ad-activate 'delete-file))
(t
(remove-hook 'find-file-hook #'projectile-find-file-hook-function)
(remove-hook 'dired-before-readin-hook #'projectile-cache-projects-find-file-hook t)
(remove-hook 'dired-before-readin-hook #'projectile-track-known-projects-find-file-hook t)
(ad-deactivate 'compilation-find-file)
(ad-deactivate 'delete-file))))

Expand Down

0 comments on commit 9c3aa2f

Please sign in to comment.