[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/keymap.c [emacs-unicode-2]
From: |
Kenichi Handa |
Subject: |
[Emacs-diffs] Changes to emacs/src/keymap.c [emacs-unicode-2] |
Date: |
Fri, 01 Oct 2004 04:10:57 -0400 |
Index: emacs/src/keymap.c
diff -c emacs/src/keymap.c:1.282.4.11 emacs/src/keymap.c:1.282.4.12
*** emacs/src/keymap.c:1.282.4.11 Tue Aug 10 07:46:40 2004
--- emacs/src/keymap.c Fri Oct 1 08:04:10 2004
***************
*** 2666,2677 ****
/* This is the function that Fwhere_is_internal calls using map_char_table.
ARGS has the form
! (((DEFINITION . NOINDIRECT) . (KEYMAP . RESULT))
.
((THIS . LAST) . (NOMENUS . LAST_IS_META)))
Since map_char_table doesn't really use the return value from this
function,
we the result append to RESULT, the slot in ARGS.
This function can GC because it calls where_is_internal_1 which can
GC. */
--- 2666,2680 ----
/* This is the function that Fwhere_is_internal calls using map_char_table.
ARGS has the form
! (((DEFINITION . NOINDIRECT) . RESULT)
.
((THIS . LAST) . (NOMENUS . LAST_IS_META)))
Since map_char_table doesn't really use the return value from this
function,
we the result append to RESULT, the slot in ARGS.
+ KEY may be a cons (FROM . TO) where both FROM and TO are integers
+ (i.e. character events).
+
This function can GC because it calls where_is_internal_1 which can
GC. */
***************
*** 2685,2691 ****
struct gcpro gcpro1, gcpro2, gcpro3;
GCPRO3 (args, key, binding);
- result = XCDR (XCAR (args));
definition = XCAR (XCAR (XCAR (args)));
noindirect = XCDR (XCAR (XCAR (args)));
this = XCAR (XCAR (XCDR (args)));
--- 2688,2693 ----
***************
*** 2693,2703 ****
nomenus = XFASTINT (XCAR (XCDR (XCDR (args))));
last_is_meta = XFASTINT (XCDR (XCDR (XCDR (args))));
! sequence = where_is_internal_1 (binding, key, definition, noindirect,
! this, last, nomenus, last_is_meta);
! if (!NILP (sequence))
! XSETCDR (XCAR (args), Fcons (sequence, result));
UNGCPRO;
}
--- 2695,2734 ----
nomenus = XFASTINT (XCAR (XCDR (XCDR (args))));
last_is_meta = XFASTINT (XCDR (XCDR (XCDR (args))));
! result = Qnil;
! if (CONSP (key) && INTEGERP (XCAR (key)) && INTEGERP (XCDR (key)))
! {
! /* Try all ASCII characters. Try also non-ASCII characters but
! only the first and last one because trying all of them is
! extremely memory and time consuming.
!
! Fixme: Perhaps it should be allowed to store a cons directly
! in RESULT. -- address@hidden */
! int from = XINT (XCAR (key)), to = XINT (XCDR (key));
! Lisp_Object k;
!
! for (; from <= to; from++)
! {
! k = make_number (from);
! sequence = where_is_internal_1 (binding, k, definition, noindirect,
! this, last, nomenus, last_is_meta);
! if (!NILP (sequence))
! result = Fcons (sequence, result);
! if (from >= 128 && from < to)
! from = to - 1;
! }
! result = Fnreverse (result);
! }
! else
! {
! sequence = where_is_internal_1 (binding, key, definition, noindirect,
! this, last, nomenus, last_is_meta);
! if (!NILP (sequence))
! result = Fcons (sequence, Qnil);
! }
! if (! NILP (result))
! nconc2 (XCAR (args), result);
UNGCPRO;
}
- [Emacs-diffs] Changes to emacs/src/keymap.c [emacs-unicode-2],
Kenichi Handa <=