summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2022-07-28 23:29:14 +0100
committerjao <jao@gnu.org>2022-07-28 23:29:14 +0100
commitea518198c86aa0d938c6147e8bac742431557283 (patch)
tree7e2fbef9fe7798e005f535b903b33c14e5bd19e2
parenta5e70559266fcc1e3230ad0de23e88d54d7f6083 (diff)
downloadelibs-ea518198c86aa0d938c6147e8bac742431557283.tar.gz
elibs-ea518198c86aa0d938c6147e8bac742431557283.tar.bz2
savehist: don't save kill ring string properties
-rw-r--r--init.el13
1 files 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