emacs-devel
[Top][All Lists]
Advanced

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

Re: On elisp running native


From: Stefan Monnier
Subject: Re: On elisp running native
Date: Sun, 05 Jan 2020 01:36:41 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

> But you wrote that ".el files are currently always loaded in a somewhat
> cumbersome way in order to perform character decoding according to the
> file's coding-system". Why isn't the emacs default to treat them all as
> utf-8 as you just suggested ? 

Because Elisp files can use any coding system they like (some were
written before utf-8 was even supported by Emacs).

So Emacs has to look at the file first to see which coding system
it uses.

It can be improved, of course, but so far this hasn't been considered
important enough for anyone to spend time on it (tho I did go through
the trouble of converting Elisp files to utf-8 and changing Emacs such
that utf-8 is used by default (i.e. in the absence of evidence to the
contrary) in preference to defaulting to the locale, in the hope that
this decoding overhead can be eliminated in a decade or two).

Of course, instead of spending time on it, you can simply compile your
Elisp files: Emacs always uses the same coding-system for the .elc it
produces, so loading them can skip this overhead.


        Stefan




reply via email to

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