Created
June 23, 2015 16:18
-
-
Save dleslie/6565d765fe0770833466 to your computer and use it in GitHub Desktop.
Function to manually trigger a revert of all buffers presently visiting a file
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
(defun revert-all-buffers () | |
"Reverts all buffers that are visiting a file." | |
(interactive) | |
(mapcar | |
(lambda (buf) | |
(with-current-buffer buf | |
(when (buffer-file-name) | |
(revert-buffer t t t)))) | |
(buffer-list))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment