0

On certain occasions, when I save a buffer I have made changes to, it automatically adds ^M to the end of the lines. I find this problematic as it makes reading git diffs a pain. Is there any way to disable Emacs from doing this? Thanks.

i_trope
  • 1,554
  • 2
  • 22
  • 42

1 Answers1

3

You can specify the output encoding with C-xReturnf. You will notice that some encodings end in -dos: these will insert ^M at line ends. Select the encoding that ends in -unix, it shouldn't add the characters.

choroba
  • 231,213
  • 25
  • 204
  • 289