Skip to content

Instantly share code, notes, and snippets.

@rummelonp
Created April 23, 2022 00:06
Show Gist options
  • Save rummelonp/6f5d7fb63f355f34acae591b87c4824b to your computer and use it in GitHub Desktop.
Save rummelonp/6f5d7fb63f355f34acae591b87c4824b to your computer and use it in GitHub Desktop.
emacs で開いてる全バッファまとめてインデントするやつ
(defun my/indent-and-save-all-buffers ()
(interactive)
(dolist (buffer (buffer-list))
(unless (string-match-p "*" (buffer-name buffer))
(save-excursion
(switch-to-buffer buffer)
(indent-region (point-min) (point-max))
(save-some-buffers t)))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment