WestfW
WestfW

Reputation: 21

newlines on RCS $Log:$ output

I'm using RCS (v5.7) for version control on a Mac (10.7.5). I find it sufficient for a single user. Is there a way to get the $Log:$ output in the source code to have crlf (\r\n) line endings instead of newline (\n)? I'd like the source to be maximally compatible with other OSes, so I'm using DOS file coding (in emacs.) This works fine, until the $Log:$ data gets added with only newlines, and emacs decides that it's not DOS format any more...

Upvotes: 2

Views: 97

Answers (1)

VonC
VonC

Reputation: 1329492

This is doubtful, considering the RCS file format does mention:

an RCS file must end with newline (U+0A)

A Unix tool like indent would only consider \n as char escape sequence.

If Emacs is acting out, it is best to have some commands in place to restore its dos-file nature.

(defun dos-file ()
      "Change the current buffer to Latin 1 with DOS line-ends."
      (interactive)
      (set-buffer-file-coding-system 'iso-latin-1-dos t))

Upvotes: 1

Related Questions