Skip to content

Commit

Permalink
Move setup savehist-mode to projectile-mode
Browse files Browse the repository at this point in the history
  • Loading branch information
TxGVNN committed Apr 8, 2021
1 parent 0e75638 commit efca95b
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions projectile.el
Original file line number Diff line number Diff line change
Expand Up @@ -5118,20 +5118,19 @@ Otherwise behave as if called interactively.
(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)
(advice-add 'compilation-find-file :around #'compilation-find-file-projectile-find-compilation-buffer)
(advice-add 'delete-file :before #'delete-file-projectile-remove-from-cache))
(advice-add 'delete-file :before #'delete-file-projectile-remove-from-cache)
(if (bound-and-true-p savehist-loaded)
(add-to-list 'savehist-additional-variables 'projectile-project-command-history)
(defvar savehist-additional-variables nil)
(add-hook 'savehist-mode-hook
(lambda()
(add-to-list 'savehist-additional-variables 'projectile-project-command-history)))))
(t
(remove-hook 'find-file-hook #'projectile-find-file-hook-function)
(remove-hook 'dired-before-readin-hook #'projectile-track-known-projects-find-file-hook t)
(advice-remove 'compilation-find-file #'compilation-find-file-projectile-find-compilation-buffer)
(advice-remove 'delete-file #'delete-file-projectile-remove-from-cache))))

(if (bound-and-true-p savehist-loaded)
(add-to-list 'savehist-additional-variables 'projectile-project-command-history)
(defvar savehist-additional-variables nil)
(add-hook 'savehist-mode-hook
(lambda()
(add-to-list 'savehist-additional-variables 'projectile-project-command-history))))

;;;###autoload
(define-obsolete-function-alias 'projectile-global-mode 'projectile-mode "1.0")

Expand Down

0 comments on commit efca95b

Please sign in to comment.