[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Unicode Lisp reader escapes
From: |
Juri Linkov |
Subject: |
Re: [PATCH] Unicode Lisp reader escapes |
Date: |
Thu, 11 May 2006 15:03:18 +0300 |
User-agent: |
Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux) |
> Support for \u and \U in Emacs Lisp would be good since other _Lisp_
> languages
> support \uXXXX and \UXXXXXXXX as well. But other Lisp languages support
> also Lisp notation for Unicode characters. I think Emacs should support
> it too. In this notation Unicode characters are written as #\u3042 or
> #\u0002a6b2 with the leading hash mark.
>
> We do not in general try to be compatible with Common Lisp on input
> syntax for characters. So forget this.
The initial `#' character is a valid Emacs hash notation for writing
integers in various bases. After adding `\uXXXX' it seems reasonable
to add `#\uXXXX' as well. However, there is one difference: Emacs Lisp
hash notation doesn't use the backslash `\' after `#', e.g. `#x42',
but other Lisps use the backslash in the notation of Unicode characters,
e.g. `#\u3042'. I have no opinion which notation is better.
> Also it would be good to support a syntax for named Unicode characters.
> Common Lisp has the syntax #\euro_sign, and Perl - \N{EURO SIGN}.
>
> I tend to think we should not do this now.
> Does Emacs have a table of these names?
The variable `describe-char-unicodedata-file' points to the file
`UnicodeData.txt' not distributed currently with Emacs. This could be
done in the emacs-unicode branch. I think this question should be
considered after the release.
--
Juri Linkov
http://www.jurta.org/emacs/
Re: [PATCH] Unicode Lisp reader escapes, Juri Linkov, 2006/05/05