Is there an emacs function to convert a camel-cased word to underscore? Something, like:
longVariableName
M-x to-underscore
M-x
to-underscore
(progn (replace-regexp "\\([A-Z]\\)" "_\\1" nil (region-beginning) (region-end)) (downcase-region (region-beginning) (region-end)))