I try to run several commands in a sequence in Emacs. None of the commands needs an argument (indent-region, untabify, and delete-trailing-whitespace). I tried to follow the older post on emacs-key-binding-for-multiple-commands and came up with the following solution:
(defun format-properly ()
"Run `indent-region', `untabify' and `delete-trailing-whitespace' in sequence."
(interactive)
(indent-region)
(untabify)
(delete-trailing-whitespace))
(global-set-key (kbd "C-c a b c") 'format-properly)
This gives me the following error message when I try to run it: "Wrong number of arguments: (2 . 3), 0".
Since I have zero experience with lisp, I don't have any idea what to do and would be happy about any suggestion. :)
Thanks! Julie