[Bugfix] Fix running condition and loading of real-auto-save

This commit is contained in:
Gergely Polonkai 2018-11-19 13:02:56 +01:00
parent 088e0225bf
commit 1787aca026

View File

@ -2149,7 +2149,7 @@ First, a function that turns off auto-saving for remote files.
#+BEGIN_SRC emacs-lisp
(defun gpolonkai/dont-autosave-remote ()
(unless (file-remote-p (or (buffer-file-name) ""))
(when (and buffer-file-name (not (file-remote-p buffer-file-name)))
(real-auto-save-mode)))
#+END_SRC
@ -2157,8 +2157,10 @@ Then configure ~real-auto-save-mode~
#+BEGIN_SRC emacs-lisp
(use-package real-auto-save
:demand t
:hook
(text-mode . gpolonkai/dont-autosave-remote))
(text-mode . gpolonkai/dont-autosave-remote)
(prog-mode . gpolonkai/dont-autosave-remote))
#+END_SRC
** Help merging ~pacsave~ and ~pacnew~ files