Created
June 22, 2012 00:17
-
-
Save darrik/2969415 to your computer and use it in GitHub Desktop.
darrik/revert-all-buffers
This file contains hidden or 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
;; Based on (org-revert-all-org-buffers) | |
(defun darrik/revert-all-buffers () | |
(interactive) | |
(unless (yes-or-no-p "Revert all buffers?") | |
(error "Abort")) | |
(save-excursion | |
(save-window-excursion | |
(mapc | |
(lambda (buffer) | |
(when (with-current-buffer buffer buffer-file-name) | |
(switch-to-buffer buffer) | |
(revert-buffer t 'no-confirm))) | |
(buffer-list))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment