I want to implement the functionality, that i wrote about in the title. Since searching the web for existing solutions didn't give me anything useful, i figured i would just try and implement it myself.
I would want to just add a lambda or function to my init.el-File, that executes everytime, it looks at an opening multi-line-comment and inserts that matching closing chars. This is what i have so far:
(add-hook 'c-mode-hook
(lambda ()
(if (looking-at "/*")
(insert "*/"))))
Probably not right at all. I just started with elisp a while ago, so help and explanation will be thankfully appreciated! If there is an existing solution, i also wouldn't hesitate to try that out. Is there an option to enable this in C-Mode, as well as in C++-Mode? Thanks in advance!
M-;
to enter comments?//
per line. Also i'm looking to improve my understanding of elisp-code and i thought developing something for my needs would be a good exercise. Well- but at the moment i'm stuck so i posted this question.