Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fix #1637] Integrate with savehist-mode #1661

Merged
merged 4 commits into from
May 25, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
* [#1340](https://github.com/bbatsov/projectile/pull/1340): Fix remote projects being removed if TRAMP can't connect.
* [#1655](https://github.com/bbatsov/projectile/pull/1655): Fix `projectile-replace-regexp` searching the wrong files when called with prefix arg.
* [#1659](https://github.com/bbatsov/projectile/issues/1659): Fix `projectile-project-vcs` to work outside a project.
* [#1637](https://github.com/bbatsov/projectile/pull/1661): Integrate with savehist-mode

## 2.3.0 (2020-11-27)

Expand Down
8 changes: 7 additions & 1 deletion projectile.el
Original file line number Diff line number Diff line change
Expand Up @@ -5118,7 +5118,13 @@ 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)
TxGVNN marked this conversation as resolved.
Show resolved Hide resolved
(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)
Expand Down