Created
February 11, 2009 16:58
-
-
Save snj14/62120 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; reqpen-recent-closed-file | |
(defvar recent-closed-files nil) | |
(defun collect-recent-closed-files () | |
(when buffer-file-name | |
(push buffer-file-name recent-closed-files))) | |
(add-hook 'kill-buffer-hook 'collect-recent-closed-files) | |
(defun reopen-recent-closed-file () | |
(interactive) | |
(when recent-closed-files | |
(let (path) | |
(while (not (setq path (pop recent-closed-files)))) | |
(find-file path)))) | |
(global-set-key (kbd "C-z") 'reopen-recent-closed-file) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment