From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Miles Bader Newsgroups: gmane.emacs.devel,gmane.emacs.pretest.bugs Subject: Re: GNU Emacs 22.0.50 fails to find =?iso-8859-1?q?=E4?= in different ISO Latin encodings Date: Fri, 22 Sep 2006 20:27:40 +0900 Message-ID: References: <1B8CD230-9A54-4F2A-B0FA-5CD02730F034@web.de> <4CEE7BA9-0CEF-40CD-A081-2C707A44833B@web.de> <453787ED-925B-49B5-A203-3211329FCB13@web.de> <35A5EBE2-652D-488C-9CFD-E7B56A8C2D07@web.de> Reply-To: Miles Bader NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1158924627 20508 80.91.229.2 (22 Sep 2006 11:30:27 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 22 Sep 2006 11:30:27 +0000 (UTC) Cc: emacs-pretest-bug@gnu.org, emacs-devel@gnu.org, rms@gnu.org, Kenichi Handa Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Sep 22 13:30:21 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 1GQjEK-0004fG-6q for ged-emacs-devel@m.gmane.org; Fri, 22 Sep 2006 13:30:04 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GQjEJ-0008Iu-7F for ged-emacs-devel@m.gmane.org; Fri, 22 Sep 2006 07:30:03 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GQjE5-0008HT-2U for emacs-devel@gnu.org; Fri, 22 Sep 2006 07:29:49 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GQjE3-0008Fe-Ht for emacs-devel@gnu.org; Fri, 22 Sep 2006 07:29:48 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GQjE3-0008FY-Ab; Fri, 22 Sep 2006 07:29:47 -0400 Original-Received: from [203.180.232.82] (helo=mgate02.necel.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GQjHj-0003jt-Be; Fri, 22 Sep 2006 07:33:35 -0400 Original-Received: from relay11.aps.necel.com (relay11 [10.29.19.46]) by mgate02.necel.com (8.13.8/8.13.1) with ESMTP id k8M92Gqh019041; Fri, 22 Sep 2006 20:29:42 +0900 (JST) Original-Received: from relay21.aps.necel.com ([10.29.19.24] [10.29.19.24]) by relay11.aps.necel.com with ESMTP; Fri, 22 Sep 2006 20:29:42 +0900 Original-Received: from dhapc248.dev.necel.com ([10.114.97.235] [10.114.97.235]) by relay21.aps.necel.com with ESMTP; Fri, 22 Sep 2006 20:29:42 +0900 Original-Received: by dhapc248.dev.necel.com (Postfix, from userid 31295) id 24E7A44C; Fri, 22 Sep 2006 20:27:41 +0900 (JST) Original-To: Peter Dyballa System-Type: i686-pc-linux-gnu Blat: Foop In-Reply-To: <35A5EBE2-652D-488C-9CFD-E7B56A8C2D07@web.de> (Peter Dyballa's message of "Fri\, 22 Sep 2006 12\:55\:12 +0200") Original-Lines: 70 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:60099 gmane.emacs.pretest.bugs:14097 Archived-At: Peter Dyballa writes: > There is also the option to change the 'base' of the character code > notation from 8 to 16 This feature is supported; see the variable `read-quoted-char-radix'. > This might be the correct way in a GNU Emacs way, but not in the way an > Emacs user would use it. Or can I type C-q 4245 RET to input =A5 in some > file? (Well, it actually works ...) Having to use other numbers than > the well-known three digits wide ones is not the usual user > experience. I suppose that a patch such as the following could be used to support at least unicode input in `read-quoted-char' (the function underlying C-q). (set `read-quoted-char-charset' to `ucs' to input unicode-codes) Whether this is a serious enough problem to consider adding a patch this latein the release cycle to consider, I don't know. [I think the default value of read-quoted-char-charset would probably have to remain nil though...] -Miles 2006-09-22 Miles Bader * subr.el (read-quoted-char-charset): New variable. (read-quoted-char): Use it. --- orig/lisp/subr.el +++ mod/lisp/subr.el @@ -1539,6 +1548,17 @@ :type '(choice (const 8) (const 10) (const 16)) :group 'editing-basics) =20 +(defvar read-quoted-char-charset nil + "*The character-set used for numeric codepoints entered with `read-quote= d-char'. +If nil, Emacs' internal codepoints are used.") + +(custom-declare-variable-early + 'read-quoted-char-charset nil + "*The character-set used for numeric codepoints entered with `read-quoted= -char'. +If nil, Emacs' internal codepoints are used." + :type '(choice (const nil) (const ucs)) + :group 'editing-basics) + (defun read-quoted-char (&optional prompt) "Like `read-char', but do not allow quitting. Also, if the first character read is an octal digit, @@ -1595,7 +1615,13 @@ (t (setq code translated done t))) (setq first nil)) - code)) + (if (null read-quoted-char-charset) + code + (let ((decoded (decode-char read-quoted-char-charset code))) + (when (null decoded) + (error "Invalid %s character: %d, #o%o, #x%x" + read-quoted-char-charset code code code)) + decoded)))) =20 (defun read-passwd (prompt &optional confirm default) "Read a password, prompting with PROMPT, and return it. --=20 The secret to creativity is knowing how to hide your sources. --Albert Einstein