emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AGAIN: Can't isearch 'ö'


From: Stefan Monnier
Subject: Re: AGAIN: Can't isearch 'ö'
Date: Thu, 08 Dec 2005 11:39:12 -0500
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

> 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]