Emacs has a slightly obscurely named command
delete-indentation which is bound to
M-^ which can be rather useful. From the help for the function (which you can always look up using
C-h k M-^ or
C-h f delete-indentation):
Join this line to previous and fix up whitespace at join.
You can use this multiple times to “gather up” lines, joining them together. The easiest way to explain is with an example:
N.B. after I have joined the lines in the example above, I used
M-q to wrap (fill) the lines tidily.