From owner-freebsd-questions Thu Apr 27 7: 6:13 2000 Delivered-To: freebsd-questions@freebsd.org Received: from europe.std.com (europe.std.com [199.172.62.20]) by hub.freebsd.org (Postfix) with ESMTP id 6D81637B84E for ; Thu, 27 Apr 2000 07:05:59 -0700 (PDT) (envelope-from lowell@world.std.com) Received: from world.std.com (lowell@world-f.std.com [199.172.62.5]) by europe.std.com (8.9.3/8.9.3) with ESMTP id KAA03395 for ; Thu, 27 Apr 2000 10:05:52 -0400 (EDT) Received: (from lowell@localhost) by world.std.com (8.9.3/8.9.3) id KAA15505; Thu, 27 Apr 2000 10:05:52 -0400 (EDT) To: freebsd-questions@freebsd.org Subject: Re: Convert DOS -> Unix text References: <20000426175651.A92365@localhost.localdomain> From: Lowell Gilbert Date: 27 Apr 2000 10:05:52 -0400 In-Reply-To: djkanter@nwu.edu's message of 27 Apr 2000 01:00:58 +0200 Message-ID: Lines: 23 X-Mailer: Gnus v5.5/Emacs 20.2 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG djkanter@nwu.edu (David J. Kanter) writes: > I use two flavors of Emacs: one on DOS, one on BSD. The BSD version > complains when compiling my c++ programs because DOS uses a different kind > of carriage return than Unix. The warning I get is: > > warning: carriage return in preprocessing directive > > How can I convert DOS text into BSD text? I looked at convert, but that > seems to be for images only. If you want emacs to do the conversion for you, set the coding system for the buffer. There are different ways to do this; I think most people set file-coding-system-alist to handle this, but you might find buffer-file-coding-system more convenient. The idea is to make sure that emacs is always storing text in Unix format, regardless of which platform you're on. As a really ugly hack, you could just start a comment at the end of your preprocessor lines. Doesn't allow multi-line macros, of course... Be well. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message