bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#21780: 25.0.50; Saving *Help* results in bad encoding because of cur


From: Andy Moreton
Subject: bug#21780: 25.0.50; Saving *Help* results in bad encoding because of curly quotes
Date: Sat, 31 Oct 2015 18:10:11 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (windows-nt)

On Sat 31 Oct 2015, Eli Zaretskii wrote:

>> From: Andy Moreton <andrewjmoreton@gmail.com>
>> Date: Fri, 30 Oct 2015 23:06:22 +0000
>> 
>> On Fri 30 Oct 2015, Eli Zaretskii wrote:
>> 
>> >> Date: Fri, 30 Oct 2015 22:50:57 +0200
>> >> From: Eli Zaretskii <eliz@gnu.org>
>> >> Cc: 21780@debbugs.gnu.org
>> >> 
>> >> If you want to have Unix EOLs by default, the correct customization is
>> >> this:
>> >> 
>> >>   (setq-default buffer-file-coding-system
>> >>                 (coding-system-change-eol-conversion
>> >>                  buffer-file-coding-system 'unix))
>> >
>> > This variant is better:
>> >
>> >   (setq-default buffer-file-coding-system
>> >                 (coding-system-change-eol-conversion
>> >                  default-buffer-file-coding-system 'unix))
>> 
>> Why ? Help for `default-buffer-file-coding-system' says:
>> 
>>   This variable is obsolete since 23.2;
>>   use ‘buffer-file-coding-system’ instead.
>
> Then use (default-value buffer-file-coding-system) instead.  The point
> being to use the default value to modify the default value.  When this
> code runs, the current buffer should have the same value as its
> buffer-local value, but I preferred not to rely on that.

I see your point. So you prefer this:

(setq-default buffer-file-coding-system
              (coding-system-change-eol-conversion
               (default-value 'buffer-file-coding-system) 'unix))

Thanks for answering this - a useful addition to my init.el.

    AndyM






reply via email to

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