Skip to content

Instantly share code, notes, and snippets.

@prajwalit
Created June 23, 2011 07:04
Show Gist options
  • Select an option

  • Save prajwalit/1042064 to your computer and use it in GitHub Desktop.

Select an option

Save prajwalit/1042064 to your computer and use it in GitHub Desktop.
save-layout before killing emacs
;;; save-layout before killing emacs. (needs revive.el) https://github.com/nunb/revive-mode-config
(defun save-state-kill-emacs (&optional arg)
"Save state, buffers and kill emacs"
(interactive "p")
(emacs-save-layout)
(save-buffers-kill-emacs))
(global-set-key (kbd "C-x C-c") 'save-state-kill-emacs)
@vedang

vedang commented Jun 24, 2011

Copy link
Copy Markdown

Praj,

The easier way to do this is to hook the kill-emacs function. vedang/emacs-up@b6548d1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment