Create a named function for the autosave predicate
This commit is contained in:
parent
9ae31dc4be
commit
8b0ac14305
1 changed files with 5 additions and 1 deletions
|
|
@ -8,6 +8,10 @@
|
|||
(zerop (call-process "git" nil nil nil
|
||||
"-C" dirname "ls-files" "--error-unmatch" filename))))
|
||||
|
||||
(defun should-auto-save-current-buffer-p ()
|
||||
"Check whether the current buffer should be autosaved."
|
||||
(git-tracked-file-p buffer-file-name))
|
||||
|
||||
(defun find-init-file ()
|
||||
"Find the user's init file"
|
||||
(interactive)
|
||||
|
|
@ -42,7 +46,7 @@
|
|||
; keep-sorted start
|
||||
(auto-save-interval 20)
|
||||
(auto-save-visited-mode t)
|
||||
(auto-save-visited-predicate (lambda () (git-tracked-file-p buffer-file-name)))
|
||||
(auto-save-visited-predicate #'should-auto-save-current-buffer)
|
||||
(column-number-mode t)
|
||||
(dired-dwim-target 'dired-dwim-target-next)
|
||||
(display-time-24hr-format t)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue