[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Detect end-of-line format
From: |
Joe Riel |
Subject: |
Re: Detect end-of-line format |
Date: |
Tue, 2 Feb 2021 08:02:10 -0800 |
On Tue, 2 Feb 2021 09:20:34 +0100
Philipp Stephani <p.stephani2@gmail.com> wrote:
> Am Di., 2. Feb. 2021 um 06:04 Uhr schrieb Joe Riel <joer@san.rr.com>:
> >
> > Is there an emacs function that indicates the end-of-line
> > format (unix, dos, mac) used in the file associated with
> > a buffer?
> >
>
> Try
> (coding-system-eol-type buffer-file-coding-system)
> or, if the buffer hasn't been decoded yet:
> (coding-system-eol-type (detect-coding-region (point-min) (point-max)
> :highest))
>
Thanks, the first works for my purposes.
--
Joe Riel