diff --git a/.emacs.d/init.el b/.emacs.d/init.el index 54cfcf7..1de62e7 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -61,7 +61,15 @@ (use-package savehist :demand :config - (savehist-mode)) + (savehist-mode) + (defun savehist-file-name-history-cleanup () + "Delete all the files in file-name-history that don't exist anymore" + (interactive) + (setq file-name-history + (seq-filter + (lambda (file) + (or (file-remote-p file) (file-exists-p file))) + file-name-history)))) (use-package paren :demand :config