I know that you can do the following to sort-lines in emacs without case sensitivity:
M-x set-variable [RETURN] sort-fold-case [RETURN] t [RETURN]
M-x sort-lines
M-x set-variable [RETURN] sort-fold-case [RETURN] nil [RETURN]
But this is annoying to do every time. How can I turn this into a function so that I don't have to do the same thing over and over?