[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/keyboard.c
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] Changes to emacs/src/keyboard.c |
Date: |
Wed, 14 May 2003 14:43:14 -0400 |
Index: emacs/src/keyboard.c
diff -c emacs/src/keyboard.c:1.742 emacs/src/keyboard.c:1.743
*** emacs/src/keyboard.c:1.742 Sun May 11 11:06:41 2003
--- emacs/src/keyboard.c Wed May 14 14:43:12 2003
***************
*** 5013,5020 ****
case MULTIBYTE_CHAR_KEYSTROKE_EVENT:
{
Lisp_Object lispy_c;
! XSETFASTINT (lispy_c, event->code);
return lispy_c;
}
--- 5013,5029 ----
case MULTIBYTE_CHAR_KEYSTROKE_EVENT:
{
Lisp_Object lispy_c;
+ int c = event->code;
! /* Add in the other modifier bits. We took care of ctrl_modifier
! just above, and the shift key was taken care of by the X code,
! and applied to control characters by make_ctrl_char. */
! c |= (event->modifiers
! & (meta_modifier | alt_modifier
! | hyper_modifier | super_modifier | ctrl_modifier));
! /* What about the `shift' modifier ? */
! button_down_time = 0;
! XSETFASTINT (lispy_c, c);
return lispy_c;
}
***************
*** 8205,8211 ****
such as Vfunction_key_map and Vkey_translation_map. */
typedef struct keyremap
{
! Lisp_Object map;
int start, end;
} keyremap;
--- 8214,8220 ----
such as Vfunction_key_map and Vkey_translation_map. */
typedef struct keyremap
{
! Lisp_Object map, parent;
int start, end;
} keyremap;
***************
*** 8270,8277 ****
The return value is non-zero if the remapping actually took place. */
static int
! keyremap_step (keybuf, bufsize, fkey, input, doit, diff, parent, prompt)
! Lisp_Object *keybuf, prompt, parent;
keyremap *fkey;
int input, doit, *diff, bufsize;
{
--- 8279,8286 ----
The return value is non-zero if the remapping actually took place. */
static int
! keyremap_step (keybuf, bufsize, fkey, input, doit, diff, prompt)
! Lisp_Object *keybuf, prompt;
keyremap *fkey;
int input, doit, *diff, bufsize;
{
***************
*** 8306,8312 ****
= Faref (next, make_number (i));
fkey->start = fkey->end += *diff;
! fkey->map = parent;
return 1;
}
--- 8315,8321 ----
= Faref (next, make_number (i));
fkey->start = fkey->end += *diff;
! fkey->map = fkey->parent;
return 1;
}
***************
*** 8318,8324 ****
if (!CONSP (fkey->map))
{
fkey->end = ++fkey->start;
! fkey->map = parent;
}
return 0;
}
--- 8327,8333 ----
if (!CONSP (fkey->map))
{
fkey->end = ++fkey->start;
! fkey->map = fkey->parent;
}
return 0;
}
***************
*** 8474,8481 ****
last_nonmenu_event = Qnil;
delayed_switch_frame = Qnil;
! fkey.map = Vfunction_key_map;
! keytran.map = Vkey_translation_map;
/* If there is no translation-map, turn off scanning. */
fkey.start = fkey.end = KEYMAPP (fkey.map) ? 0 : bufsize + 1;
keytran.start = keytran.end = KEYMAPP (keytran.map) ? 0 : bufsize + 1;
--- 8483,8490 ----
last_nonmenu_event = Qnil;
delayed_switch_frame = Qnil;
! fkey.map = fkey.parent = Vfunction_key_map;
! keytran.map = keytran.parent = Vkey_translation_map;
/* If there is no translation-map, turn off scanning. */
fkey.start = fkey.end = KEYMAPP (fkey.map) ? 0 : bufsize + 1;
keytran.start = keytran.end = KEYMAPP (keytran.map) ? 0 : bufsize + 1;
***************
*** 8631,8639 ****
keybuf[i - first_unbound - 1] = keybuf[i];
mock_input = t - first_unbound - 1;
fkey.end = fkey.start -= first_unbound + 1;
! fkey.map = Vfunction_key_map;
keytran.end = keytran.start -= first_unbound + 1;
! keytran.map = Vkey_translation_map;
goto replay_sequence;
}
--- 8640,8648 ----
keybuf[i - first_unbound - 1] = keybuf[i];
mock_input = t - first_unbound - 1;
fkey.end = fkey.start -= first_unbound + 1;
! fkey.map = fkey.parent;
keytran.end = keytran.start -= first_unbound + 1;
! keytran.map = keytran.parent;
goto replay_sequence;
}
***************
*** 9185,9191 ****
invariant that keytran.end <= fkey.start). */
{
if (fkey.start < t)
! (fkey.start = fkey.end = t, fkey.map = Vfunction_key_map);
}
else
/* If the sequence is unbound, see if we can hang a function key
--- 9194,9200 ----
invariant that keytran.end <= fkey.start). */
{
if (fkey.start < t)
! (fkey.start = fkey.end = t, fkey.map = fkey.parent);
}
else
/* If the sequence is unbound, see if we can hang a function key
***************
*** 9203,9209 ****
first_binding >= nmaps) we don't want
to apply this function-key-mapping. */
fkey.end + 1 == t && first_binding >= nmaps,
! &diff, Vfunction_key_map, prompt);
UNGCPRO;
if (done)
{
--- 9212,9218 ----
first_binding >= nmaps) we don't want
to apply this function-key-mapping. */
fkey.end + 1 == t && first_binding >= nmaps,
! &diff, prompt);
UNGCPRO;
if (done)
{
***************
*** 9221,9227 ****
GCPRO3 (fkey.map, keytran.map, delayed_switch_frame);
done = keyremap_step (keybuf, bufsize, &keytran, max (t, mock_input),
! 1, &diff, Vkey_translation_map, prompt);
UNGCPRO;
if (done)
{
--- 9230,9236 ----
GCPRO3 (fkey.map, keytran.map, delayed_switch_frame);
done = keyremap_step (keybuf, bufsize, &keytran, max (t, mock_input),
! 1, &diff, prompt);
UNGCPRO;
if (done)
{
- [Emacs-diffs] Changes to emacs/src/keyboard.c, Stefan Monnier, 2003/05/03
- [Emacs-diffs] Changes to emacs/src/keyboard.c, Stefan Monnier, 2003/05/03
- [Emacs-diffs] Changes to emacs/src/keyboard.c, Stefan Monnier, 2003/05/05
- [Emacs-diffs] Changes to emacs/src/keyboard.c, Stefan Monnier, 2003/05/10
- [Emacs-diffs] Changes to emacs/src/keyboard.c, Stefan Monnier, 2003/05/10
- [Emacs-diffs] Changes to emacs/src/keyboard.c, Stefan Monnier, 2003/05/11
- [Emacs-diffs] Changes to emacs/src/keyboard.c, Stefan Monnier, 2003/05/14
- [Emacs-diffs] Changes to emacs/src/keyboard.c,
Stefan Monnier <=
- [Emacs-diffs] Changes to emacs/src/keyboard.c, Stefan Monnier, 2003/05/15
- [Emacs-diffs] Changes to emacs/src/keyboard.c, Stefan Monnier, 2003/05/24
- [Emacs-diffs] Changes to emacs/src/keyboard.c, Kim F. Storm, 2003/05/24
- [Emacs-diffs] Changes to emacs/src/keyboard.c, Juanma Barranquero, 2003/05/26