[Top][All Lists]

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

Re: [Emacs-diffs] master db828f6: Don't rely on defaults in decoding UTF

From: Paul Eggert
Subject: Re: [Emacs-diffs] master db828f6: Don't rely on defaults in decoding UTF-8 encoded Lisp files
Date: Fri, 25 Sep 2015 15:32:11 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0

Stefan Monnier wrote:
we won't want to have redundant "coding:utf-8" tags everywhere, so we need
to find ways to go from here (i.e. "need a coding: tag for any non-ASCII
file") to there.

Yes, requiring coding: cookies for every UTF-8 file is error-prone. We can't easily put cookies into every such file, as some of them are copied verbatim from other sources. And even for our own files, it's too easy to add a bit of UTF-8 text to a cookieless file and forget to add a cookie.

Here's a better idea. Developers that use a UTF-8 locale are OK already. Let's suggest to the remaining developers that they put something like the following into their .emacs:

  (add-hook 'auto-coding-functions (lambda (size) 'utf-8))

This will let Emacs default to UTF-8 for files that don't already have a coding cookie.

reply via email to

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