Fix savehist compression & persist marks
+ Fixes: doom-unpropertize-kill-ring-h ran too late to affect the value of kill-ring that gets saved. + Adds: now persist mark-ring and global-mark-ring (doesn't affect evil users)
This commit is contained in:
parent
d81ef69525
commit
9a5175dd0e
1 changed files with 6 additions and 3 deletions
|
@ -262,9 +262,12 @@ possible."
|
||||||
(setq savehist-file (concat doom-cache-dir "savehist"))
|
(setq savehist-file (concat doom-cache-dir "savehist"))
|
||||||
:config
|
:config
|
||||||
(setq savehist-save-minibuffer-history t
|
(setq savehist-save-minibuffer-history t
|
||||||
savehist-autosave-interval nil ; save on kill only
|
savehist-autosave-interval nil ; save on kill only
|
||||||
savehist-additional-variables '(kill-ring search-ring regexp-search-ring))
|
savehist-additional-variables
|
||||||
(add-hook! 'kill-emacs-hook
|
'(kill-ring ; persist clipboard
|
||||||
|
mark-ring global-mark-ring ; persist marks
|
||||||
|
search-ring regexp-search-ring)) ; persist searches
|
||||||
|
(add-hook! 'savehist-save-hook
|
||||||
(defun doom-unpropertize-kill-ring-h ()
|
(defun doom-unpropertize-kill-ring-h ()
|
||||||
"Remove text properties from `kill-ring' for a smaller savehist file."
|
"Remove text properties from `kill-ring' for a smaller savehist file."
|
||||||
(setq kill-ring (cl-loop for item in kill-ring
|
(setq kill-ring (cl-loop for item in kill-ring
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue