emacs-devel
[Top][All Lists]
Advanced

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

set-language-environment sets default EOL type to -unix


From: Eli Zaretskii
Subject: set-language-environment sets default EOL type to -unix
Date: Sat, 17 Jan 2009 14:59:44 +0200

While working on bug #1853, I found something that looks like a bug:
set-language-environment always produces
default-buffer-file-coding-system with -unix EOL.

This happens because set-language-environment calls
reset-language-environment, which sets default-buffer-file-coding-system
to nil.  Then set-language-environment calls
set-language-environment-coding-systems, which does this:

  (let* ((priority (get-language-info language-name 'coding-priority))
         (default-coding (car priority))
         (eol-type (coding-system-eol-type default-buffer-file-coding-system)))

But coding-system-eol-type interprets its argument nil as
no-conversion:

  if (NILP (coding_system))
    coding_system = Qno_conversion;

and the result is that set-language-environment-coding-systems always
attached -unix to the value of default-coding.

I think this is a bug, and I think the right fix is to change
set-language-environment-coding-systems to not pass nil to
coding-system-eol-type, but instead leave the EOL type as undecided in
this case.  Does anyone object to this fix?




reply via email to

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