emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Fix hack-local-variables for find-file-literally with dos en


From: Lars Ingebrigtsen
Subject: Re: [PATCH] Fix hack-local-variables for find-file-literally with dos encoding
Date: Mon, 16 Aug 2021 00:14:43 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Lars Ingebrigtsen <larsi@gnus.org> writes:

>> -          (subst-char-in-region (point) (point-max) ?\^m ?\n)
>> +          (unless noconv
>> +            (subst-char-in-region (point) (point-max) ?\^m ?\n))

Looking at the existing code here, I think that `subst-char-in-region'
is wrong in any case, but following the history of that function is
pretty difficult.  It might have originated here?

commit e0b2a2d9afff14ce5babae84c50f24f1f0e89b02
Author:     Richard M. Stallman <rms@gnu.org>
AuthorDate: Mon Sep 20 16:12:57 2004 +0000

If the intention is to fix up DOS line endings, when it's the wrong
thing -- it should transform \r\n to \n, not transform any \r anywhere
in a line to \n...

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no



reply via email to

[Prev in Thread] Current Thread [Next in Thread]