(defun my-indent-region () "Mark whole buffer and indent." (interactive) (save-excursion (mark-whole-buffer) (if (region-active-p) (progn (indent-region (point-min) (point-max))))))Declare the function in your .emacs file. then bind it with:
(global-set-key (kbd "<f8>") 'my-indent-region)
Inga kommentarer:
Skicka en kommentar