about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--init.el16
-rw-r--r--lisp/+emacs.el21
2 files changed, 24 insertions, 13 deletions
diff --git a/init.el b/init.el index 101cc0a..112f342 100644 --- a/init.el +++ b/init.el
@@ -2434,14 +2434,14 @@
2434 (:with-mode ssh-authorized-keys-mode 2434 (:with-mode ssh-authorized-keys-mode
2435 (:file-match (rx "/authorized_keys" (? "2") eos)))) 2435 (:file-match (rx "/authorized_keys" (? "2") eos))))
2436 2436
2437(setup (:straight super-save) 2437;; (setup (:straight super-save)
2438 (:option auto-save-default nil 2438;; (:option auto-save-default nil
2439 super-save-auto-save-when-idle t 2439;; super-save-auto-save-when-idle t
2440 super-save-idle-duration 30 2440;; super-save-idle-duration 30
2441 super-save-exclude '(".gpg") 2441;; super-save-exclude '(".gpg")
2442 super-save-remote-files nil) 2442;; super-save-remote-files nil)
2443 (auto-save-visited-mode -1) 2443;; (auto-save-visited-mode -1)
2444 (super-save-mode +1)) 2444;; (super-save-mode +1))
2445 2445
2446(setup (:straight systemd 2446(setup (:straight systemd
2447 (executable-find "systemd")) 2447 (executable-find "systemd"))
diff --git a/lisp/+emacs.el b/lisp/+emacs.el index b4742da..d6071a3 100644 --- a/lisp/+emacs.el +++ b/lisp/+emacs.el
@@ -33,12 +33,14 @@ Do this only if the buffer is not visiting a file."
33 async-shell-command-buffer 'new-buffer 33 async-shell-command-buffer 'new-buffer
34 async-shell-command-display-buffer nil 34 async-shell-command-display-buffer nil
35 auto-hscroll-mode 'current-line 35 auto-hscroll-mode 'current-line
36 auto-revert-verbose nil 36 auto-revert-verbose t
37 auto-save-file-name-transforms `((".*" ,(.etc "auto-save/" t) t)) 37 auto-save-default nil
38 auto-save-interval 60 38 auto-save-file-name-transforms `((".*" ,(.etc "auto-save/") ,(car (secure-hash-algorithms)))
39 (".*" ,(.etc "auto-save/") t))
40 auto-save-interval 30
39 auto-save-list-file-prefix (.etc "auto-save/.saves-" t) 41 auto-save-list-file-prefix (.etc "auto-save/.saves-" t)
40 auto-save-timeout 60 42 auto-save-timeout 30
41 auto-save-visited-interval 60 43 auto-save-visited-interval 5
42 auto-window-vscroll nil 44 auto-window-vscroll nil
43 backup-by-copying t 45 backup-by-copying t
44 backup-directory-alist `((".*" . ,(.etc "backup/" t))) 46 backup-directory-alist `((".*" . ,(.etc "backup/" t)))
@@ -105,6 +107,7 @@ Do this only if the buffer is not visiting a file."
105 regexp-search-ring-max 100 107 regexp-search-ring-max 100
106 regexp-search-ring-max 200 108 regexp-search-ring-max 200
107 save-interprogram-paste-before-kill t 109 save-interprogram-paste-before-kill t
110 save-some-buffers-default-predicate #'+save-some-buffers-p
108 scroll-conservatively 101 111 scroll-conservatively 101
109 scroll-down-aggressively 0.01 112 scroll-down-aggressively 0.01
110 scroll-margin 2 113 scroll-margin 2
@@ -190,6 +193,7 @@ Do this only if the buffer is not visiting a file."
190 file-name-shadow-mode 193 file-name-shadow-mode
191 minibuffer-electric-default-mode 194 minibuffer-electric-default-mode
192 delete-selection-mode 195 delete-selection-mode
196 auto-save-visited-mode
193 ;; column-number-mode 197 ;; column-number-mode
194 )) 198 ))
195 (when (fboundp enable-mode) 199 (when (fboundp enable-mode)
@@ -292,6 +296,13 @@ ARG is passed to `backward-kill-word'."
292(advice-add #'yank-pop :after #'+yank@indent) 296(advice-add #'yank-pop :after #'+yank@indent)
293 297
294 298
299;;; Extra functions
300
301(defun +save-some-buffers-p ()
302 "Predicate for `save-some-buffers-default-predicate'.
303It returns nil with remote files."
304 (not (file-remote-p (buffer-file-name))))
305
295;;; Bindings 306;;; Bindings
296 307
297;; I need to place these bindings under `+key-mode-map' so that they aren't 308;; I need to place these bindings under `+key-mode-map' so that they aren't