From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Unicode Lisp reader escapes Date: Sun, 14 May 2006 23:27:20 -0400 Message-ID: <87psigou2p.fsf-monnier+emacs@gnu.org> References: <17491.34779.959316.484740@parhasard.net> <877j4z5had.fsf@gmx.de> <87irohfrx1.fsf@gmx.de> <87iroarr9i.fsf-monnier+emacs@gnu.org> <87d5egrb4c.fsf-monnier+emacs@gnu.org> <87ves8p0us.fsf-monnier+emacs@gnu.org> <87ves8ngtb.fsf@gmx.de> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1147666485 22561 80.91.229.2 (15 May 2006 04:14:45 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 15 May 2006 04:14:45 +0000 (UTC) Cc: handa@m17n.org, rms@gnu.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon May 15 06:14:41 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FfUTc-0002xE-Qq for ged-emacs-devel@m.gmane.org; Mon, 15 May 2006 06:14:37 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FfUTc-0006zL-9R for ged-emacs-devel@m.gmane.org; Mon, 15 May 2006 00:14:36 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FfUTP-0006xp-AW for emacs-devel@gnu.org; Mon, 15 May 2006 00:14:23 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FfUTN-0006w8-Rk for emacs-devel@gnu.org; Mon, 15 May 2006 00:14:22 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FfUTN-0006w5-Lu for emacs-devel@gnu.org; Mon, 15 May 2006 00:14:21 -0400 Original-Received: from [209.226.175.34] (helo=tomts13-srv.bellnexxia.net) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FfTmE-0002gd-9H; Sun, 14 May 2006 23:29:46 -0400 Original-Received: from alfajor ([70.53.193.91]) by tomts13-srv.bellnexxia.net (InterMail vM.5.01.06.13 201-253-122-130-113-20050324) with ESMTP id <20060515032720.QOTS29052.tomts13-srv.bellnexxia.net@alfajor>; Sun, 14 May 2006 23:27:20 -0400 Original-Received: by alfajor (Postfix, from userid 1000) id A8A13D7754; Sun, 14 May 2006 23:27:20 -0400 (EDT) Original-To: Oliver Scholz In-Reply-To: <87ves8ngtb.fsf@gmx.de> (Oliver Scholz's message of "Mon, 15 May 2006 04:49:04 +0200") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:54481 Archived-At: >> Forcing it to nil for a particular file is maybe too much work to implement >> compared to th benefit. >> Maybe an easier solution is to add a file-local variable >> `no-8859-unification' such that if that file is loaded in an Emacs which >> is configured to use unify-8859-on-decoding it signals an error. >> >> It could then be added to files like ucs-tables.el. > [Nitpick: ucs-tables.el is encoded in ISO 2022. Most of Emacs' files > containing m18n characters are, AFAIK. I don't know the reason. Maybe > because it's 7bit, but still ASCII compatible. ] I'm not sure I understand the nitpick: - the reason most files use iso-2022 is because it was the only mildly standard generic encoding well supported by Emacs (utf-8 is slowly getting there, but Emacs-CVS's support for it is still behind). - ucs-tables.el, if saved as utf-8, would not do the same any more: it relies on the various "equivalent" 8859 chars to be distinguished (as is done in iso-2022, and as can't be done in utf-8). That's also why opening it with unify-8859-on-decoding is wrong: you're not looking at the right code any more because you basically get what you'd get if it had been saved in a unified encoding such as utf-8. > How about just issuing a warning with the warning message containing a > description of the effects and of what to do to change the settings? > (warn "You have enabled ... but this source file contains > characters from ... Emacs has ... This might or might not be what > you want ... To restore the defaults do ... bla bla ... > ... you might want to use `emacs-mule' as coding system for Emacs Lisp > source files ...")) I'm actually not sure if using emacs-mule instead of iso-2022 helps. It depends on whether or not unify-8859-on-decoding is also applied to emacs-mule "decoding". > Though, the only way to deal with the latter would be to modify the > Lisp printer for writing *.elc files so that it escapes non-ascii > characters whereever possible with the new \u syntax. This would be > another solution to the problem we are discussing.] This would break the compilation of ucs-tables.el. Stefan