Fix non-string errors from kill-ring

When unpropertizing the kill ring.
This commit is contained in:
Henrik Lissner 2018-08-11 02:05:33 +02:00
parent 12c5490a39
commit 735e14270e
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -102,7 +102,10 @@ fundamental-mode) for performance sake."
(defun doom|unpropertize-kill-ring ()
"Remove text properties from `kill-ring' in the interest of shrinking the
savehist file."
(setq kill-ring (mapcar #'substring-no-properties kill-ring)))
(setq kill-ring (cl-loop for item in kill-ring
if (stringp item)
collect (substring-no-properties item)
else if item collect it)))
(add-hook 'kill-emacs-hook #'doom|unpropertize-kill-ring))
;; persistent point location in buffers