snj14 (owner)

Revisions

gist: 62120 Download_button fork
public
Public Clone URL: git://gist.github.com/62120.git
Embed All Files: show embed
reopen-recent-closed-file #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
;; 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)