Репозиторий ALT Linux backports/2.4
Последнее обновление: 9 июля 2008 | Пакетов: 497 | Посещений: 1585077
 поиск   регистрация   авторизация 
 
Группа :: Редакторы
Пакет: emacs22

 Главная   Изменения   Спек   Патчи   Загрузить   Bugs and FR 

Патч: emacs-22.0.50-Meta-Alt-Ctrl-Hyper-super-discard-state.patch


--- emacs/src/xterm.c	2005-09-05 21:06:33 +0600
+++ emacs/src/xterm.c.ctrl	2005-09-05 21:14:35 +0600
@@ -6206,11 +6206,20 @@
 
           /* make_lispy_event turns chars into control chars.
              Don't do it here because XLookupString is too eager.  */
-          event.xkey.state &= ~ControlMask;
-          event.xkey.state &= ~(dpyinfo->meta_mod_mask
-                                | dpyinfo->super_mod_mask
-                                | dpyinfo->hyper_mod_mask
-                                | dpyinfo->alt_mod_mask);
+          /* make CMsHA behave the same no matter what the rest of the 
+             state is (particularly important for multilingual XKBmaps
+             when we still want the latin letters appear in the "control"
+             sequences; would be nice if we also could choose an independent
+             map for each buffer like xxkb does for windows: the the problem with
+             smth like C-h f in Russian mode would be solved); discard
+             all mods save shift. (imz@altlinux.ru, 2002 Nov 8,
+             fixing #852 at bugs.altlinux.ru) */
+          if (event.xkey.state & ( ControlMask
+				   | dpyinfo->meta_mod_mask
+				   | dpyinfo->super_mod_mask
+				   | dpyinfo->hyper_mod_mask
+				   | dpyinfo->alt_mod_mask))
+            event.xkey.state &= (ShiftMask | dpyinfo->shift_lock_mask);
 
           /* In case Meta is ComposeCharacter,
              clear its status.  According to Markus Ehrnsperger
 
design & coding: Vladimir Lettiev aka crux © 2004-2005