emacs-pretest-bug
[Top][All Lists]
Advanced

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

Re: Re: Can't isearch 'ö'


From: Stefan Monnier
Subject: Re: Re: Can't isearch 'ö'
Date: Thu, 14 Apr 2005 10:31:34 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

>>>> The problem is that the ö you type at the isearch prompt is a latin-1
>>>> ö whereas the one in the buffer is a latin-9 ö (Emacs's internal
>>>> representation of characters has such duplicates).
>>>> Try M-x unify-8859-on-decoding-mode RET (before you even open the file).
>>> It is already set:
>> - open the latin-9 file
>> - go to the ö file in it, hit C-u C-x =, and shows the result
>    character: ö (07566, 3958, 0xf76, U+00F6)
[...]
>> - then insert ö somewhere, place point back on this newly inserted char
>> and do C-u C-x = again (and show us the result again).
>    character: ö (07566, 3958, 0xf76, U+00F6)
[...]
>> C-u M-: (read-event) RET ö
>> and show us the result.
> 2294 (04366, 0x8f6)

Hmm... indeed the translation-table-for-input is not used for X11 keys.
Now that I look at it a bit more, I think the patch below would make sense.
What do other people think?

I does fix the above problem and with this patch installed we can even
remove all the other places where we pass a char through
translation-table-for-input (i.e. in quail, self-insert-command, and a few
more).

Any objection/adjustment?


        Stefan


Index: src/keyboard.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/keyboard.c,v
retrieving revision 1.820
diff -u -r1.820 keyboard.c
--- src/keyboard.c      12 Apr 2005 10:25:05 -0000      1.820
+++ src/keyboard.c      14 Apr 2005 14:23:03 -0000
@@ -3226,6 +3224,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);
 }




reply via email to

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