I currently have a function like so in my
(defun insert-todo ()
(insert "// TODO(map) : ")
It is bound to my key combination of
// is the start of a comment for that particular language. However, I want to dynamically insert the appropriate comment character based on the major mode I'm in.
Java Mode -> //
Python mode -> #
Lisp mode -> ;;
So how do I, in my
.emacs config file, get the current major mode so I can insert the appropriate comment characters before adding my TODO string?