From ea518198c86aa0d938c6147e8bac742431557283 Mon Sep 17 00:00:00 2001 From: jao Date: Thu, 28 Jul 2022 23:29:14 +0100 Subject: savehist: don't save kill ring string properties --- init.el | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/init.el b/init.el index 3bf30b1..dc72deb 100644 --- a/init.el +++ b/init.el @@ -108,11 +108,16 @@ (setq savehist-file (expand-file-name "~/.emacs.d/cache/history")) (require 'savehist) + (savehist-mode t) -(setq savehist-additional-variables - '(kill-ring search-ring regexp-search-ring) - savehist-ignored-variables - '(ido-file-history)) + +(defun jao-unpropertize-kill-ring () + (setq kill-ring (mapcar #'substring-no-properties kill-ring))) + +(add-hook 'kill-emacs-hook #'jao-unpropertize-kill-ring) + +(setq savehist-additional-variables '(kill-ring search-ring regexp-search-ring) + savehist-ignored-variables '(ido-file-history)) ;;;; yes/no, bell, startup message -- cgit v1.2.3