A couple of years ago, I wrote about a nice bit of Elisp from Artur Malabarba that deals with commenting and uncommenting whole line(s). It’s sort of like comment-dwim
except that it deals with whole lines. Recently, Malabarba resumed blogging at Endless Parentheses and mentioned that the code in question is part of Emacs 25.
Malabarba describes the code here but you should note that it is now bound to Ctrl+x Ctrl+; instead of Ctrl+;.