Skip to content

Instantly share code, notes, and snippets.

@darrik
Created June 22, 2012 00:17
Show Gist options
  • Save darrik/2969415 to your computer and use it in GitHub Desktop.
Save darrik/2969415 to your computer and use it in GitHub Desktop.
darrik/revert-all-buffers
;; 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