summary refs log tree commit diff
path: root/emacs
diff options
context:
space:
mode:
authornoa2024-12-26 14:41:26 +0800
committernoa2024-12-26 14:41:26 +0800
commit73ba85d7843a851d4f7309179e66a35fbecf13dd (patch)
tree6d50a2421d84ed4a4dd3d5624df87a02608a9e3d /emacs
parent365f81c81b9a511613359abadcdc89856718a945 (diff)
Use external package for more robust autosaving
Diffstat (limited to 'emacs')
-rw-r--r--emacs/init.el12
1 files changed, 11 insertions, 1 deletions
diff --git a/emacs/init.el b/emacs/init.el
index 78cbb63..93fdb10 100644
--- a/emacs/init.el
+++ b/emacs/init.el
@@ -408,7 +408,7 @@ The misspelled word is taken from OVERLAY.  WORD is the corrected word."
 	auto-save-mode t
 	auto-save-interval 6  ;; every six keystrokes
 	auto-save-timeout 5 ;; every 5 seconds
-	auto-save-default t
+	auto-save-default nil
 	auto-save-no-message t
 	save-silently t
 	version-control t
@@ -417,6 +417,16 @@ The misspelled word is taken from OVERLAY.  WORD is the corrected word."
 (add-hook 'focus-out-hook (lambda () (interactive) (save-some-buffers t)))
 (add-hook 'mouse-leave-buffer-hook (lambda () (interactive) (save-some-buffers t)))
 
+(use-package super-save
+  :ensure t
+  :custom
+  (super-save-mode t)
+  (super-save-auto-save-when-idle t)
+  (super-save-remote-files nil)
+  (super-save-silent t)
+  (super-save-delete-trailing-whitespace 'except-current-line)
+  (super-save-all-buffers t))
+
 ;; Unfill commands
 (defun unfill-paragraph ()
   "Takes a multi-line paragraph and makes it into a single line of text."