Save all buffers on focus lost
This commit is contained in:
parent
244fe33296
commit
41da475ed4
1 changed files with 8 additions and 0 deletions
|
@ -186,6 +186,14 @@ The body of the advice is in BODY."
|
||||||
|
|
||||||
(add-hook 'mouse-leave-buffer-hook 'prelude-auto-save-command)
|
(add-hook 'mouse-leave-buffer-hook 'prelude-auto-save-command)
|
||||||
|
|
||||||
|
;; Autosave buffers when focus is lost
|
||||||
|
(defun prelude-save-all-buffers ()
|
||||||
|
"Save all modified buffers, without prompts."
|
||||||
|
(save-some-buffers 'dont-ask))
|
||||||
|
|
||||||
|
(when (version<= "24.4" emacs-version)
|
||||||
|
(add-hook 'focus-out-hook 'prelude-save-all-buffers))
|
||||||
|
|
||||||
;; highlight the current line
|
;; highlight the current line
|
||||||
(global-hl-line-mode +1)
|
(global-hl-line-mode +1)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue