Skip to content

Instantly share code, notes, and snippets.

@dleslie
Created June 23, 2015 16:18
Show Gist options
  • Save dleslie/6565d765fe0770833466 to your computer and use it in GitHub Desktop.
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
(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