emacs-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] Unicode Lisp reader escapes


From: Kenichi Handa
Subject: Re: [PATCH] Unicode Lisp reader escapes
Date: Mon, 22 May 2006 10:33:48 +0900
User-agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/22.0.50 (i686-pc-linux-gnu) MULE/5.0 (SAKAKI)

In article <address@hidden>, Richard Stallman <address@hidden> writes:

>     (1) use emacs-mule coding system
>     (2) use one of iso-2022 based coding systems (they include
>     iso-8859-X) with setting enable-character-translation to nil
>     in "Local Variables" section.

>     (1) works now.  (2) doens't work now but easy to make it
>     work as I wrote in the previous mail.

> People have pointed out disadvantages of (1).

I don't think that is a big problem because it seems that
it's very rare to handle *.el file by some tool other than
Emacs.

> Maybe (2) is a good solution.  Iwant to check, though.  It would turn
> off *all* character translation.  We need to verify that this is ok.

I believe it is ok.

> Supposing that unify-8859-on-decoding-mode is off, and you read a file
> in an iso-2022 coding system.  What character translation is done, or
> might be done, and in what cases?

> In this code,

>     (defun ucs-fragment-8859 (for-encode for-decode)
>       "Undo the unification done by `ucs-unify-8859'.
>     With prefix arg, undo unification on encoding only, i.e. don't undo
>     unification on input operations."
>       (when for-decode
>       ;; Don't Unify 8859 on decoding.
>       ;; For non-CCL coding systems (e.g. iso-latin-2).
>       (set-char-table-parent standard-translation-table-for-decode nil)

> we turn off the parent of standard-translation-table-for-decode.
> But what else might standard-translation-table-for-decode do
> for some of these coding systems?

standard-translation-table-for-decode is for reflecting any
user preferences on decoding.  So, it can do anything.  If
one hates SOFT-HYPEN (U+00AD), he can map it to `-'.

The default value of standard-translation-table-for-decode
is not nil.  It contains a mapping for
JISX0208.1978->JISX0208.1980 and JISX0201->ASCII.  But, this
is to compensate for an encoding used in Japan in vary old
time, and even if Emacs reads a *.el file in such an
encoding, on writing, the new encoding is used.  That means
that the mapping is not used when the file is read next
time.

So, disabling character translation on reading an iso-2022
*.el file effectively stabilize the byte-compiling of the
file without any actual problem.

---
Kenichi Handa
address@hidden





reply via email to

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