unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: romain@orebokech.com, emacs-devel@gnu.org
Subject: Re: AGAIN: Can't isearch 'ö'
Date: Thu, 08 Dec 2005 11:39:12 -0500	[thread overview]
Message-ID: <jwvk6efh7wu.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <E1EkBTG-0004m2-00@etlken> (Kenichi Handa's message of "Thu, 08 Dec 2005 11:25:22 +0900")

> 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;
 \f
 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

  reply	other threads:[~2005-12-08 16:39 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-08  2:25 AGAIN: Can't isearch 'ö' Kenichi Handa
2005-12-08 16:39 ` Stefan Monnier [this message]
2005-12-09  1:42   ` Richard M. Stallman
2005-12-08 19:29 ` Richard M. Stallman
2005-12-08 22:18   ` Stefan Monnier
2005-12-09  1:12     ` Kenichi Handa
2005-12-09 15:04       ` Richard M. Stallman
2005-12-10  1:15   ` Kenichi Handa
2005-12-11  0:59     ` Juri Linkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvk6efh7wu.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.org \
    --cc=romain@orebokech.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).