[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: |
Eli Zaretskii |
Subject: |
Re: [PATCH] Fix hack-local-variables for find-file-literally with dos encoding |
Date: |
Mon, 16 Aug 2021 16:22:13 +0300 |
> From: Lars Ingebrigtsen <larsi@gnus.org>
> Cc: tgbugs@gmail.com, emacs-devel@gnu.org
> Date: Mon, 16 Aug 2021 14:53:18 +0200
>
> Eli Zaretskii <eliz@gnu.org> writes:
>
> > More importantly, what about selective-display, which replaces
> > newlines with \r's? I think this replacement is for that use case.
> >
> > So perhaps the condition for the replacement should be
> > selective-display?
>
> Aha! The initial revision of files.el had:
>
> +(defun hack-local-variables (&optional force)
> [...]
> + ;; Look at next local variable spec.
> + (if selective-display (re-search-forward "[\n\C-m]")
> + (forward-line 1))
>
> So the ^M stuff that remains in here may have nothing to do with CRLF
> DOS stuff, but is something that's left over from code meant to deal
> with selective display?
Yes, I think so. It just misfires in the obscure use case that
triggered this discussion.
- Re: [PATCH] Fix hack-local-variables for find-file-literally with dos encoding, (continued)
- Re: [PATCH] Fix hack-local-variables for find-file-literally with dos encoding, Lars Ingebrigtsen, 2021/08/16
- Re: [PATCH] Fix hack-local-variables for find-file-literally with dos encoding, Lars Ingebrigtsen, 2021/08/16
- Re: [PATCH] Fix hack-local-variables for find-file-literally with dos encoding, Eli Zaretskii, 2021/08/16
- Re: [PATCH] Fix hack-local-variables for find-file-literally with dos encoding, Lars Ingebrigtsen, 2021/08/16
- Re: [PATCH] Fix hack-local-variables for find-file-literally with dos encoding,
Eli Zaretskii <=
- Re: [PATCH] Fix hack-local-variables for find-file-literally with dos encoding, Tom Gillespie, 2021/08/16
- Re: [PATCH] Fix hack-local-variables for find-file-literally with dos encoding, Stefan Monnier, 2021/08/16
- Re: [PATCH] Fix hack-local-variables for find-file-literally with dos encoding, Eli Zaretskii, 2021/08/16