From aa3cb1e7dc309ecda30769a3268d869a2569af51 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 25 Dec 2019 02:15:48 -0500 Subject: [PATCH] Inhibit saveplace in "large" files --- core/core-editor.el | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/core-editor.el b/core/core-editor.el index 5c2790425..e05101fee 100644 --- a/core/core-editor.el +++ b/core/core-editor.el @@ -251,6 +251,11 @@ possible." :after-while #'save-place-find-file-hook (if buffer-file-name (ignore-errors (recenter)))) + (defadvice! doom--inhibit-saveplace-in-long-files-a (orig-fn &rest args) + :around #'save-place-to-alist + (unless doom-large-file-p + (apply orig-fn args))) + (defadvice! doom--dont-prettify-saveplace-cache-a (orig-fn) "`save-place-alist-to-file' uses `pp' to prettify the contents of its cache. `pp' can be expensive for longer lists, and there's no reason to prettify cache