[Top][All Lists]

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

RE: Loading souce Elisp faster

From: Drew Adams
Subject: RE: Loading souce Elisp faster
Date: Mon, 25 Feb 2013 07:35:53 -0800

> > We can have "coding: utf-8;" tag at the first line.  Isn't it
> > enough?
> Yes, we can.  But most Elisp source files have already been 
> in utf-8 encoding.  In (info "(elisp) Coding Conventions"):
>      If your program contains non-ASCII characters in string or
>      character constants, you should make sure Emacs always decodes
>      these characters the same way, regardless of the user's settings.
>      The easiest way to do this is to use the coding system
>      `utf-8-emacs' (*note Coding System Basics::), and specify that
>      coding in the `-*-' line or the local variables list.
> Maybe this can be changed now (or in the near future), 
> because of the "99% utf-8 future".

Why?  What is wrong with UTF-8 code declaring itself as such?
Why break backward compatibility gratuitously?

What are you really saving by such a restrictive change?  A few chars at the
start of the file?  Is this only about laziness?

If you want to be sure, then make Emacs, upon saving, throw the user up against
the wall and ask if s?he is sure she really doesn't want to add a UTF-8
declaration, etc.

IOW, in the traditional Emacs way, have Emacs help you but not force you.  Have
Emacs make it easy to DTRT, but not stop you from doing otherwise.

And it is so simple to automatically add such a declaration line to every new
Emacs-Lisp file - automatic file headers.  Why hard-code this kind of thing?
Just let the file itself tell Emacs what it wants to be encoded in.

reply via email to

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