Handle non-file-visiting buffers gracefully
This commit is contained in:
parent
8b0ac14305
commit
23f1ca1ada
1 changed files with 2 additions and 1 deletions
|
|
@ -10,7 +10,8 @@
|
||||||
|
|
||||||
(defun should-auto-save-current-buffer-p ()
|
(defun should-auto-save-current-buffer-p ()
|
||||||
"Check whether the current buffer should be autosaved."
|
"Check whether the current buffer should be autosaved."
|
||||||
(git-tracked-file-p buffer-file-name))
|
(when buffer-file-name
|
||||||
|
(git-tracked-file-p buffer-file-name)))
|
||||||
|
|
||||||
(defun find-init-file ()
|
(defun find-init-file ()
|
||||||
"Find the user's init file"
|
"Find the user's init file"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue