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: AGAIN: Can't isearch =?iso-8859-1?q?=27=F6=27?= Date: Thu, 08 Dec 2005 11:39:12 -0500 Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1134065934 14764 80.91.229.2 (8 Dec 2005 18:18:54 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 8 Dec 2005 18:18:54 +0000 (UTC) Cc: romain@orebokech.com, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Dec 08 19:18:52 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EkQJH-0006ZA-5x for ged-emacs-devel@m.gmane.org; Thu, 08 Dec 2005 19:16:03 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EkQJZ-0006lt-0v for ged-emacs-devel@m.gmane.org; Thu, 08 Dec 2005 13:16:21 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EkOny-0002ce-7y for emacs-devel@gnu.org; Thu, 08 Dec 2005 11:39:38 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EkOnx-0002cK-AR for emacs-devel@gnu.org; Thu, 08 Dec 2005 11:39:37 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EkOnx-0002cF-78 for emacs-devel@gnu.org; Thu, 08 Dec 2005 11:39:37 -0500 Original-Received: from [132.204.24.67] (helo=mercure.iro.umontreal.ca) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EkOp0-0006Hf-77 for emacs-devel@gnu.org; Thu, 08 Dec 2005 11:40:42 -0500 Original-Received: from hidalgo.iro.umontreal.ca (hidalgo.iro.umontreal.ca [132.204.27.50]) by mercure.iro.umontreal.ca (Postfix) with ESMTP id 470B72CF6D4; Thu, 8 Dec 2005 11:39:16 -0500 (EST) Original-Received: from asado.iro.umontreal.ca (asado.iro.umontreal.ca [132.204.24.84]) by hidalgo.iro.umontreal.ca (Postfix) with ESMTP id CA7B54AC00A; Thu, 8 Dec 2005 11:39:12 -0500 (EST) Original-Received: by asado.iro.umontreal.ca (Postfix, from userid 20848) id AB6C4E6C19; Thu, 8 Dec 2005 11:39:12 -0500 (EST) Original-To: Kenichi Handa In-Reply-To: (Kenichi Handa's message of "Thu, 08 Dec 2005 11:25:22 +0900") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) X-DIRO-MailScanner-Information: Please contact the ISP for more information X-DIRO-MailScanner: Found to be clean X-DIRO-MailScanner-SpamCheck: n'est pas un polluriel, SpamAssassin (score=-4.853, requis 5, autolearn=not spam, AWL 0.05, BAYES_00 -4.90) X-MailScanner-From: monnier@iro.umontreal.ca 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:47233 Archived-At: > I still don't have a time for the above study, but the > problem should be fixed somehow. So, unless someone else > can take over this matter, I propose again to install this > change. My original suggestion is still an alternative, of course: --- orig/src/keyboard.c +++ mod/src/keyboard.c @@ -3203,6 +3183,11 @@ } exit: + if (NATNUMP (c) && !EQ (prev_event, Qt) + && CHAR_VALID_P (XFASTINT (c), Qnil)) + XSETINT (c, translate_char (Vtranslation_table_for_input, + XFASTINT (c), 0, 0, 0)); + RESUME_POLLING; RETURN_UNGCPRO (c); } This alternative has the advantage of resolving the problem once and for all (so we can remove the other pieces of code that do similar translations at various places in the code, see patch below). and bringing the behavior a bit closer to what it'll be in Emacs-23. Stefan Index: src/keyboard.c =================================================================== RCS file: /cvsroot/emacs/emacs/src/keyboard.c,v retrieving revision 1.843 diff -u -r1.843 keyboard.c --- src/keyboard.c 29 Oct 2005 19:34:58 -0000 1.843 +++ src/keyboard.c 8 Dec 2005 16:36:46 -0000 @@ -569,7 +569,7 @@ Lisp_Object Qextended_command_history; EMACS_TIME timer_check (); -extern Lisp_Object Vhistory_length, Vtranslation_table_for_input; +extern Lisp_Object Vhistory_length; extern char *x_get_keysym_name (); @@ -1710,9 +1710,7 @@ && NATNUMP (last_command_char) && CHAR_VALID_P (XFASTINT (last_command_char), 0)) { - unsigned int c - = translate_char (Vtranslation_table_for_input, - XFASTINT (last_command_char), 0, 0, 0); + unsigned int c = XFASTINT (last_command_char); int value; if (NILP (Vexecuting_kbd_macro) && !EQ (minibuf_window, selected_window)) Index: src/cmds.c =================================================================== RCS file: /cvsroot/emacs/emacs/src/cmds.c,v retrieving revision 1.93 diff -u -r1.93 cmds.c --- src/cmds.c 7 Aug 2005 12:33:16 -0000 1.93 +++ src/cmds.c 8 Dec 2005 16:36:46 -0000 @@ -43,7 +43,6 @@ Lisp_Object Vself_insert_face_command; extern Lisp_Object Qface; -extern Lisp_Object Vtranslation_table_for_input; DEFUN ("forward-point", Fforward_point, Sforward_point, 1, 1, 0, doc: /* Return buffer position N characters after (before if N negative) point. */) @@ -329,8 +329,7 @@ if (!INTEGERP (last_command_char)) bitch_at_user (); { - int character = translate_char (Vtranslation_table_for_input, - XINT (last_command_char), 0, 0, 0); + int character = XINT (last_command_char); if (XINT (n) >= 2 && NILP (current_buffer->overwrite_mode)) { int modified_char = character; Index: lisp/international/quail.el =================================================================== RCS file: /cvsroot/emacs/emacs/lisp/international/quail.el,v retrieving revision 1.145 diff -u -r1.145 quail.el --- lisp/international/quail.el 28 Oct 2005 05:47:31 -0000 1.145 +++ lisp/international/quail.el 8 Dec 2005 16:36:46 -0000 @@ -1,6 +1,7 @@ ;;; quail.el --- provides simple input method for multilingual text -;; Copyright (C) 1997, 1998, 2000, 2001, 2002 Free Software Foundation, Inc. +;; Copyright (C) 1997, 1998, 2000, 2001, 2002, 2005 +;; Free Software Foundation, Inc. ;; Copyright (C) 1995, 1997, 1998, 1999, 2000, 2001, 2003, 2004 ;; National Institute of Advanced Industrial Science and Technology (AIST) ;; Registration Number H14PRO021 @@ -1277,14 +1278,7 @@ Do so while interleaving with the following special events: \(compose-last-chars LEN COMPONENTS) \(quail-advice INPUT-STRING)" - (let* ((events (mapcar - (lambda (c) - ;; This gives us the chance to unify on input - ;; (e.g. using ucs-tables.el). - (or (and translation-table-for-input - (aref translation-table-for-input c)) - c)) - str)) + (let* ((events (mapcar 'identity str)) (len (length str)) (idx len) composition from to) @@ -3009,5 +3003,5 @@ ;; (provide 'quail) -;;; arch-tag: 46d7db54-5467-42c4-a2a9-53ca90a1e886 +;; arch-tag: 46d7db54-5467-42c4-a2a9-53ca90a1e886 ;;; quail.el ends here