Created
February 7, 2014 19:03
-
-
Save andyfriesen/8869502 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
(defun revert-all-buffers () | |
"Refreshes all open buffers from their respective files." | |
(interactive) | |
(dolist (buf (buffer-list)) | |
(with-current-buffer buf | |
(when (and (buffer-file-name) (not (buffer-modified-p))) | |
(revert-buffer t t t) ))) | |
(message "Refreshed open files.") ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment