Mercurial > hg > xemacs-beta
comparison src/event-stream.c @ 371:cc15677e0335 r21-2b1
Import from CVS: tag r21-2b1
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:03:08 +0200 |
parents | a4f53d9b3154 |
children | 8626e4521993 |
comparison
equal
deleted
inserted
replaced
370:bd866891f083 | 371:cc15677e0335 |
---|---|
2508 cause it to return immediately. | 2508 cause it to return immediately. |
2509 | 2509 |
2510 All of these routines install timeouts, so we clear the installed | 2510 All of these routines install timeouts, so we clear the installed |
2511 timeout as well. | 2511 timeout as well. |
2512 | 2512 |
2513 Note: It's very easy to break the desired behaviors of these | 2513 Note: It's very easy to break the desired behaviours of these |
2514 3 routines. If you make any changes to anything in this area, run | 2514 3 routines. If you make any changes to anything in this area, run |
2515 the regression tests at the bottom of the file. -- dmoore */ | 2515 the regression tests at the bottom of the file. -- dmoore */ |
2516 | 2516 |
2517 | 2517 |
2518 static Lisp_Object | 2518 static Lisp_Object |
3495 | 3495 |
3496 menubar_widget = FRAME_X_MENUBAR_WIDGET (f); | 3496 menubar_widget = FRAME_X_MENUBAR_WIDGET (f); |
3497 if (menubar_widget | 3497 if (menubar_widget |
3498 && CONSP (Vmenu_accelerator_modifiers)) | 3498 && CONSP (Vmenu_accelerator_modifiers)) |
3499 { | 3499 { |
3500 Lisp_Object fake = Qnil; | 3500 Lisp_Object fake; |
3501 Lisp_Object last = Qnil; | 3501 Lisp_Object last = Qnil; |
3502 struct gcpro gcpro1; | 3502 struct gcpro gcpro1; |
3503 Lisp_Object matchp; | 3503 Lisp_Object matchp; |
3504 | 3504 |
3505 widget_value *val; | 3505 widget_value *val; |
3876 { | 3876 { |
3877 struct gcpro gcpro1; | 3877 struct gcpro gcpro1; |
3878 Lisp_Object val = Qnil; | 3878 Lisp_Object val = Qnil; |
3879 int nwanted; | 3879 int nwanted; |
3880 int start, nkeys, i, j; | 3880 int start, nkeys, i, j; |
3881 GCPRO1 (val); | |
3881 | 3882 |
3882 if (NILP (number)) | 3883 if (NILP (number)) |
3883 nwanted = recent_keys_ring_size; | 3884 nwanted = recent_keys_ring_size; |
3884 else | 3885 else |
3885 { | 3886 { |
3915 nkeys = nwanted; | 3916 nkeys = nwanted; |
3916 } | 3917 } |
3917 else | 3918 else |
3918 nwanted = nkeys; | 3919 nwanted = nkeys; |
3919 | 3920 |
3920 GCPRO1 (val); | |
3921 val = make_vector (nwanted, Qnil); | 3921 val = make_vector (nwanted, Qnil); |
3922 | 3922 |
3923 for (i = 0, j = start; i < nkeys; i++) | 3923 for (i = 0, j = start; i < nkeys; i++) |
3924 { | 3924 { |
3925 Lisp_Object e = XVECTOR_DATA (Vrecent_keys_ring)[j]; | 3925 Lisp_Object e = XVECTOR_DATA (Vrecent_keys_ring)[j]; |
3949 (size)) | 3949 (size)) |
3950 { | 3950 { |
3951 Lisp_Object new_vector = Qnil; | 3951 Lisp_Object new_vector = Qnil; |
3952 int i, j, nkeys, start, min; | 3952 int i, j, nkeys, start, min; |
3953 struct gcpro gcpro1; | 3953 struct gcpro gcpro1; |
3954 GCPRO1 (new_vector); | |
3954 | 3955 |
3955 CHECK_INT (size); | 3956 CHECK_INT (size); |
3956 if (XINT (size) <= 0) | 3957 if (XINT (size) <= 0) |
3957 error ("Recent keys ring size must be positive"); | 3958 error ("Recent keys ring size must be positive"); |
3958 if (XINT (size) == recent_keys_ring_size) | 3959 if (XINT (size) == recent_keys_ring_size) |
3959 return size; | 3960 return size; |
3960 | 3961 |
3961 GCPRO1 (new_vector); | |
3962 new_vector = make_vector (XINT (size), Qnil); | 3962 new_vector = make_vector (XINT (size), Qnil); |
3963 | 3963 |
3964 if (NILP (Vrecent_keys_ring)) | 3964 if (NILP (Vrecent_keys_ring)) |
3965 { | 3965 { |
3966 Vrecent_keys_ring = new_vector; | 3966 Vrecent_keys_ring = new_vector; |
3967 UNGCPRO; | |
3968 return size; | 3967 return size; |
3969 } | 3968 } |
3970 | 3969 |
3971 if (NILP (XVECTOR_DATA (Vrecent_keys_ring)[recent_keys_ring_index])) | 3970 if (NILP (XVECTOR_DATA (Vrecent_keys_ring)[recent_keys_ring_index])) |
3972 /* This means the vector has not yet wrapped */ | 3971 /* This means the vector has not yet wrapped */ |