Save all buffers when Emacs looses focus.
This commit is contained in:
parent
e561e148e1
commit
fb01aa4728
1 changed files with 10 additions and 0 deletions
|
@ -71,6 +71,16 @@ More settings:
|
||||||
debug-on-error t)
|
debug-on-error t)
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
|
Save the file whenever I move away from Emacs (see [[https://irreal.org/blog/?p=10314][this essay]]):
|
||||||
|
#+BEGIN_SRC emacs-lisp
|
||||||
|
(defun save-all-buffers ()
|
||||||
|
"Saves all buffers, because, why not?"
|
||||||
|
(interactive)
|
||||||
|
(save-some-buffers t))
|
||||||
|
|
||||||
|
(add-hook 'focus-out-hook 'save-all-buffers)
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
And some Mac-specific settings:
|
And some Mac-specific settings:
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
(when (ha-running-on-macos?)
|
(when (ha-running-on-macos?)
|
||||||
|
|
Loading…
Reference in a new issue