Commenting Un-commenting

After watching an interesting video by EmacsElements regarding commenting and un-commenting I have to say that I wholeheartedly agree. I really don’t like the way comment-dwim works and made me think back to one of the first elisp functions I commandeered from the interwebs :

(defun my/comment-or-uncomment ()
 "Comments or uncomments the current line or region."
 (if (region-active-p)

and it is a command that I constantly use and had forgotten that it isn’t part of the emacs default functionality from a M-;

comments powered by Disqus