I was editing some code which was originally written on a Windows machine and it had carriage return characters at the end of each line:

To remove them:
M-x replace-string RET C-q C-m RET RET
I was editing some code which was originally written on a Windows machine and it had carriage return characters at the end of each line:
To remove them:
M-x replace-string RET C-q C-m RET RET