I wrote this function
(defun sk-convert-to-ctor-init-list ()
"Convert a C++ member variable declaration to a ctor init list line.
To use this, copy all member variable declarations into the constructor's
member initialization list area and execute this command on each line. At the
end of this command, it moves you to the next line setting it up for a key
(delete-horizontal-space) ; delete whitespace at end of line
(backward-delete-char-untabify 1) ; delete the ";"
(search-backward-regexp "[\t *]") ; look for whitespace or "*"
(set-mark (+ (point) 1)) ; save the current position
(kill-region (point) (mark))
to take a region that containers C++ code for member variable
declarations and convert it to a constructor's member init list. Is
there a better (or a more ELisp) way than this approach? Thanks.