Hello, I'm a beginner at Emacs, I tried to figure this out by myself at first but it's too confusing for me.
I use God Mode on Emacs (vim-like modes) and I want to exit it when the comment-dwim command doesn't comment out a region, only when it does and indented comment or a comment in an empty line, so that I can write afterwards, without having to press esc.
​
Maybe there is some way to add the god-local-mode-pause function (the function to get into "insert mode", so as to say) to any of the comment related functions, however, I don't really know elisp, so any help is much appreciated.
Tl;dr: is there any way to adhere a function to another so that when I execute one, with its name, it does another one as well?
Edit: never mind, just learned what advising functions are for.
The code I ended up with :
(defadvice comment-indent (after comment-indent-after activate) (god-local-mode-pause))
(defadvice comment-add (after comment-add-after activate) (god-local-mode-pause))
​