aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKaroly Lorentey2004-02-20 15:41:31 +0000
committerKaroly Lorentey2004-02-20 15:41:31 +0000
commit3b7fbceb8359279028f466091b22ab11c5484bc3 (patch)
tree2717da66d1b1213826e5622d0a57b94d0833a909 /src
parentaaaf7fe1673a2a5ece2eebaccf2d67a60e9938eb (diff)
parent2320865de4ed4217fd534a5644f6ed0977981df1 (diff)
downloademacs-3b7fbceb8359279028f466091b22ab11c5484bc3.tar.gz
emacs-3b7fbceb8359279028f466091b22ab11c5484bc3.zip
Merged in changes from CVS HEAD
Patches applied: * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-104 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-105 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-106 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-87
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog31
-rw-r--r--src/fringe.c6
-rw-r--r--src/keyboard.c176
-rw-r--r--src/lisp.h18
4 files changed, 121 insertions, 110 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 744259568e4..58661af0867 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,26 @@
12004-02-20 Kim F. Storm <storm@cua.dk>
2
3 * keyboard.c: Undo 2004-02-16 and 2004-02-17 changes.
4 The following changes are relative to the 2004-01-21 revision.
5 (NREAD_INPUT_EVENTS): Define as max number of input events to read
6 in one call to read_socket_hook. Value is 8.
7 (read_avail_input): Separate and rework handling of read_socket_hook
8 and non-read_socket_hook cases. Use smaller input_event buffer
9 in read_socket_hook case, and repeat if full buffer is read. Use
10 new local variable 'discard' to skip input after C-g.
11 In non-read_socket_hook case, just use a single input_event, and
12 call kbd_buffer_store_event on the fly for each character.
13
142004-02-19 Stefan Monnier <monnier@iro.umontreal.ca>
15
16 * lisp.h (union Lisp_Object): Give a more precise type for `type'.
17 Remove unused `gu' alternative.
18
192004-02-19 Andreas Schwab <schwab@suse.de>
20
21 * fringe.c (Fdefine_fringe_bitmap): Use && instead of & to avoid
22 warning.
23
12004-02-18 Kim F. Storm <storm@cua.dk> 242004-02-18 Kim F. Storm <storm@cua.dk>
2 25
3 * xdisp.c (get_window_cursor_type, display_and_set_cursor): 26 * xdisp.c (get_window_cursor_type, display_and_set_cursor):
@@ -44,9 +67,9 @@
44 67
452004-02-15 Stefan Monnier <monnier@iro.umontreal.ca> 682004-02-15 Stefan Monnier <monnier@iro.umontreal.ca>
46 69
47 * data.c (Fbyteorder): 70 * data.c (Fbyteorder):
48 * fringe.c (Fdefine_fringe_bitmap): 71 * fringe.c (Fdefine_fringe_bitmap):
49 * xdisp.c (handle_single_display_prop): 72 * xdisp.c (handle_single_display_prop):
50 * xselect.c (x_handle_dnd_message): Lisp_Object/int mixup. 73 * xselect.c (x_handle_dnd_message): Lisp_Object/int mixup.
51 74
522004-02-16 Jason Rumney <jasonr@gnu.org> 752004-02-16 Jason Rumney <jasonr@gnu.org>
@@ -59,7 +82,7 @@
59 controlling emulation of a three button mouse with option and 82 controlling emulation of a three button mouse with option and
60 command keys. 83 command keys.
61 (Qreverse, mac_get_enumlated_btn): Handle the emulation 84 (Qreverse, mac_get_enumlated_btn): Handle the emulation
62 (mac_event_to_emacs_modifiers, XTread_socket): Ditto 85 (mac_event_to_emacs_modifiers, XTread_socket): Ditto.
63 86
642004-02-15 Kim F. Storm <storm@cua.dk> 872004-02-15 Kim F. Storm <storm@cua.dk>
65 88
diff --git a/src/fringe.c b/src/fringe.c
index bd93b4cfce5..b14668e8d7e 100644
--- a/src/fringe.c
+++ b/src/fringe.c
@@ -1192,9 +1192,9 @@ Return new bitmap number, or nil of no more free bitmap slots. */)
1192 1192
1193 fb.dynamic = 1; 1193 fb.dynamic = 1;
1194 1194
1195 xfb = (struct fringe_bitmap *)xmalloc (sizeof fb 1195 xfb = (struct fringe_bitmap *) xmalloc (sizeof fb
1196 + fb.height * BYTES_PER_BITMAP_ROW); 1196 + fb.height * BYTES_PER_BITMAP_ROW);
1197 fb.bits = b = (unsigned short *)(xfb+1); 1197 fb.bits = b = (unsigned short *) (xfb + 1);
1198 bzero (b, fb.height); 1198 bzero (b, fb.height);
1199 1199
1200 j = 0; 1200 j = 0;
diff --git a/src/keyboard.c b/src/keyboard.c
index 26b1bfa89e1..4cae90cd764 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -4051,9 +4051,9 @@ kbd_buffer_get_event (kbp, used_mouse_menu)
4051 If there is no valid info, it does not store anything 4051 If there is no valid info, it does not store anything
4052 so x remains nil. */ 4052 so x remains nil. */
4053 x = Qnil; 4053 x = Qnil;
4054 4054
4055 /* XXX Can f or mouse_position_hook be NULL here? */ 4055 /* XXX Can f or mouse_position_hook be NULL here? */
4056 if (f && FRAME_DISPLAY (f)->mouse_position_hook) 4056 if (f && FRAME_DISPLAY (f)->mouse_position_hook)
4057 (*FRAME_DISPLAY (f)->mouse_position_hook) (&f, 0, &bar_window, 4057 (*FRAME_DISPLAY (f)->mouse_position_hook) (&f, 0, &bar_window,
4058 &part, &x, &y, &time); 4058 &part, &x, &y, &time);
4059 4059
@@ -4986,7 +4986,7 @@ make_lispy_position (f, x, y, time)
4986 { 4986 {
4987 Lisp_Object string; 4987 Lisp_Object string;
4988 int charpos; 4988 int charpos;
4989 4989
4990 posn = (part == ON_LEFT_MARGIN) ? Qleft_margin : Qright_margin; 4990 posn = (part == ON_LEFT_MARGIN) ? Qleft_margin : Qright_margin;
4991 rx = wx, ry = wy; 4991 rx = wx, ry = wy;
4992 string = marginal_area_string (w, part, &rx, &ry, &charpos, 4992 string = marginal_area_string (w, part, &rx, &ry, &charpos,
@@ -5469,7 +5469,7 @@ make_lispy_event (event)
5469 { 5469 {
5470 Lisp_Object position; 5470 Lisp_Object position;
5471 Lisp_Object head; 5471 Lisp_Object head;
5472 5472
5473 /* Build the position as appropriate for this mouse click. */ 5473 /* Build the position as appropriate for this mouse click. */
5474 struct frame *f = XFRAME (event->frame_or_window); 5474 struct frame *f = XFRAME (event->frame_or_window);
5475 5475
@@ -6457,7 +6457,7 @@ get_filtered_input_pending (addr, do_timers_now, filter_events)
6457 /* If input is being read as it arrives, and we have none, there is none. */ 6457 /* If input is being read as it arrives, and we have none, there is none. */
6458 if (*addr > 0 || (interrupt_input && ! interrupts_deferred)) 6458 if (*addr > 0 || (interrupt_input && ! interrupts_deferred))
6459 return; 6459 return;
6460 6460
6461 /* Try to read some input and see how much we get. */ 6461 /* Try to read some input and see how much we get. */
6462 gobble_input (0); 6462 gobble_input (0);
6463 *addr = (!NILP (Vquit_flag) 6463 *addr = (!NILP (Vquit_flag)
@@ -6560,14 +6560,6 @@ record_asynch_buffer_change ()
6560 6560
6561#ifndef VMS 6561#ifndef VMS
6562 6562
6563/* We make the read_avail_input buffer static to avoid zeroing out the
6564 whole struct input_event buf on every call. */
6565static struct input_event read_avail_input_buf[KBD_BUFFER_SIZE];
6566
6567/* I don't know whether it is necessary, but make read_avail_input
6568 re-entrant. */
6569static int in_read_avail_input = 0;
6570
6571/* Read any terminal input already buffered up by the system 6563/* Read any terminal input already buffered up by the system
6572 into the kbd_buffer, but do not wait. 6564 into the kbd_buffer, but do not wait.
6573 6565
@@ -6578,75 +6570,89 @@ static int in_read_avail_input = 0;
6578 only when SIGIO is blocked. 6570 only when SIGIO is blocked.
6579 6571
6580 Returns the number of keyboard chars read, or -1 meaning 6572 Returns the number of keyboard chars read, or -1 meaning
6581 this is a bad time to try to read input. */ 6573 this is a bad time to try to read input.
6574
6575 Typically, there are just a few available input events to be read
6576 here, so we really don't need to allocate and initialize a big
6577 buffer of input_events as we used to do. Instead, we just allocate
6578 a small buffer of input events -- and then poll for more input if we
6579 read a full buffer of input events. */
6580
6581#define NREAD_INPUT_EVENTS 8
6582 6582
6583static int 6583static int
6584read_avail_input (expected) 6584read_avail_input (expected)
6585 int expected; 6585 int expected;
6586{ 6586{
6587 struct input_event *buf = read_avail_input_buf;
6588 struct input_event tmp_buf[KBD_BUFFER_SIZE];
6589 register int i; 6587 register int i;
6590 int nread = 0; 6588 int nread = 0;
6591 struct display *d; 6589 struct display *d;
6592
6593 /* Trivial hack to make read_avail_input re-entrant. */
6594 if (in_read_avail_input++)
6595 {
6596 buf = tmp_buf;
6597 for (i = 0; i < KBD_BUFFER_SIZE; i++)
6598 EVENT_INIT (buf[i]);
6599 }
6600 6590
6601 /* Loop through the available displays, and call their input hooks. */ 6591 /* Loop through the available displays, and call their input hooks. */
6602 d = display_list; 6592 d = display_list;
6603 while (d) 6593 while (d)
6604 { 6594 {
6605 struct display *next = d->next_display; 6595 struct display *next = d->next_display;
6606
6607 if (d->read_socket_hook)
6608 /* No need for FIONREAD or fcntl; just say don't wait. */
6609 nread = (*d->read_socket_hook) (d, buf, KBD_BUFFER_SIZE, expected);
6610 6596
6611 if (nread == -2) /* -2 means non-transient error */ 6597 if (d->read_socket_hook)
6612 { 6598 {
6613 /* The display device terminated; it should be closed. */ 6599 int discard = 0;
6600 int nr;
6614 6601
6615 /* Kill Emacs if this was our last display. */ 6602 do {
6616 if (! display_list->next_display) 6603 struct input_event buf[NREAD_INPUT_EVENTS];
6617 kill (getpid (), SIGHUP);
6618 6604
6619 /* XXX Is calling delete_display safe here? It calls Fdelete_frame. */ 6605 for (i = 0; i < NREAD_INPUT_EVENTS; i++)
6620 if (d->delete_display_hook) 6606 EVENT_INIT (buf[i]);
6621 (*d->delete_display_hook) (d); 6607
6622 else 6608 /* No need for FIONREAD or fcntl; just say don't wait. */
6623 delete_display (d); 6609 nr = (*d->read_socket_hook) (d, buf, NREAD_INPUT_EVENTS, expected);
6624 } 6610
6625 else if (nread > 0) 6611 if (nr > 0)
6626 { 6612 {
6627 /* We've got input. */ 6613 /* We've got input. */
6628 break; 6614 nread += nr;
6615 expected = 0;
6616
6617 /* Scan the chars for C-g and store them in kbd_buffer. */
6618 for (i = 0; !discard && i < nr; i++)
6619 {
6620 kbd_buffer_store_event (&buf[i]);
6621 /* Don't look at input that follows a C-g too closely.
6622 This reduces lossage due to autorepeat on C-g. */
6623 if (buf[i].kind == ASCII_KEYSTROKE_EVENT
6624 && buf[i].code == quit_char)
6625 discard = 1;
6626 }
6627 }
6628 else if (nr == -2) /* Non-transient error. */
6629 {
6630 /* The display device terminated; it should be closed. */
6631
6632 /* Kill Emacs if this was our last display. */
6633 if (! display_list->next_display)
6634 /* Formerly simply reported no input, but that
6635 sometimes led to a failure of Emacs to terminate.
6636 SIGHUP seems appropriate if we can't reach the
6637 terminal. */
6638 /* ??? Is it really right to send the signal just to
6639 this process rather than to the whole process
6640 group? Perhaps on systems with FIONREAD Emacs is
6641 alone in its group. */
6642 kill (getpid (), SIGHUP);
6643
6644 /* XXX Is calling delete_display safe here? It calls Fdelete_frame. */
6645 if (d->delete_display_hook)
6646 (*d->delete_display_hook) (d);
6647 else
6648 delete_display (d);
6649 }
6650 } while (nr == NREAD_INPUT_EVENTS);
6629 } 6651 }
6630 6652
6631 d = next; 6653 d = next;
6632 } 6654 }
6633 6655
6634 /* Scan the chars for C-g and store them in kbd_buffer. */
6635 for (i = 0; i < nread; i++)
6636 {
6637 kbd_buffer_store_event (&buf[i]);
6638 /* Don't look at input that follows a C-g too closely.
6639 This reduces lossage due to autorepeat on C-g. */
6640 if (buf[i].kind == ASCII_KEYSTROKE_EVENT
6641 && buf[i].code == quit_char)
6642 break;
6643 }
6644
6645 /* Clear used events */
6646 if (--in_read_avail_input == 0)
6647 for (i = 0; i < nread; i++)
6648 EVENT_INIT (buf[i]);
6649
6650 return nread; 6656 return nread;
6651} 6657}
6652 6658
@@ -6668,10 +6674,10 @@ tty_read_avail_input (struct display *display,
6668 int n_to_read, i; 6674 int n_to_read, i;
6669 struct tty_display_info *tty = display->display_info.tty; 6675 struct tty_display_info *tty = display->display_info.tty;
6670 int nread = 0; 6676 int nread = 0;
6671 6677
6672 if (display->type != output_termcap) 6678 if (display->type != output_termcap)
6673 abort (); 6679 abort ();
6674 6680
6675 /* XXX I think the following code should be moved to separate hook 6681 /* XXX I think the following code should be moved to separate hook
6676 functions in system-dependent files. */ 6682 functions in system-dependent files. */
6677#ifdef WINDOWSNT 6683#ifdef WINDOWSNT
@@ -6681,15 +6687,15 @@ tty_read_avail_input (struct display *display,
6681 n_to_read = dos_keysns (); 6687 n_to_read = dos_keysns ();
6682 if (n_to_read == 0) 6688 if (n_to_read == 0)
6683 return 0; 6689 return 0;
6684 6690
6685 cbuf[0] = dos_keyread (); 6691 cbuf[0] = dos_keyread ();
6686 nread = 1; 6692 nread = 1;
6687 6693
6688#else /* not MSDOS */ 6694#else /* not MSDOS */
6689 6695
6690 if (! tty->term_initted) /* In case we get called during bootstrap. */ 6696 if (! tty->term_initted) /* In case we get called during bootstrap. */
6691 return 0; 6697 return 0;
6692 6698
6693 /* Determine how many characters we should *try* to read. */ 6699 /* Determine how many characters we should *try* to read. */
6694#ifdef FIONREAD 6700#ifdef FIONREAD
6695 /* Find out how much input is available. */ 6701 /* Find out how much input is available. */
@@ -6713,7 +6719,7 @@ tty_read_avail_input (struct display *display,
6713 you lose; 6719 you lose;
6714#endif 6720#endif
6715#endif 6721#endif
6716 6722
6717 /* Now read; for one reason or another, this will not block. 6723 /* Now read; for one reason or another, this will not block.
6718 NREAD is set to the number of chars read. */ 6724 NREAD is set to the number of chars read. */
6719 do 6725 do
@@ -6753,19 +6759,19 @@ tty_read_avail_input (struct display *display,
6753 0 6759 0
6754#endif 6760#endif
6755 ); 6761 );
6756 6762
6757#ifndef FIONREAD 6763#ifndef FIONREAD
6758#if defined (USG) || defined (DGUX) || defined (CYGWIN) 6764#if defined (USG) || defined (DGUX) || defined (CYGWIN)
6759 fcntl (fileno (TTY_INPUT (tty)), F_SETFL, 0); 6765 fcntl (fileno (TTY_INPUT (tty)), F_SETFL, 0);
6760#endif /* USG or DGUX or CYGWIN */ 6766#endif /* USG or DGUX or CYGWIN */
6761#endif /* no FIONREAD */ 6767#endif /* no FIONREAD */
6762 6768
6763 if (nread <= 0) 6769 if (nread <= 0)
6764 return nread; 6770 return nread;
6765 6771
6766#endif /* not MSDOS */ 6772#endif /* not MSDOS */
6767#endif /* not WINDOWSNT */ 6773#endif /* not WINDOWSNT */
6768 6774
6769 for (i = 0; i < nread; i++) 6775 for (i = 0; i < nread; i++)
6770 { 6776 {
6771 buf[i].kind = ASCII_KEYSTROKE_EVENT; 6777 buf[i].kind = ASCII_KEYSTROKE_EVENT;
@@ -6774,7 +6780,7 @@ tty_read_avail_input (struct display *display,
6774 buf[i].modifiers = meta_modifier; 6780 buf[i].modifiers = meta_modifier;
6775 if (tty->meta_key != 2) 6781 if (tty->meta_key != 2)
6776 cbuf[i] &= ~0x80; 6782 cbuf[i] &= ~0x80;
6777 6783
6778 buf[i].code = cbuf[i]; 6784 buf[i].code = cbuf[i];
6779 /* Set the frame corresponding to the active tty. Note that the 6785 /* Set the frame corresponding to the active tty. Note that the
6780 value of selected_frame is not reliable here, redisplay tends 6786 value of selected_frame is not reliable here, redisplay tends
@@ -6785,7 +6791,6 @@ tty_read_avail_input (struct display *display,
6785 6791
6786 return nread; 6792 return nread;
6787} 6793}
6788
6789#endif /* not VMS */ 6794#endif /* not VMS */
6790 6795
6791void 6796void
@@ -8316,7 +8321,7 @@ access_keymap_keyremap (map, key, prompt, do_funcall)
8316 int do_funcall; 8321 int do_funcall;
8317{ 8322{
8318 Lisp_Object next; 8323 Lisp_Object next;
8319 8324
8320 next = access_keymap (map, key, 1, 0, 1); 8325 next = access_keymap (map, key, 1, 0, 1);
8321 8326
8322 /* Handle symbol with autoload definition. */ 8327 /* Handle symbol with autoload definition. */
@@ -8331,7 +8336,7 @@ access_keymap_keyremap (map, key, prompt, do_funcall)
8331 && (!NILP (Farrayp (XSYMBOL (next)->function)) 8336 && (!NILP (Farrayp (XSYMBOL (next)->function))
8332 || KEYMAPP (XSYMBOL (next)->function))) 8337 || KEYMAPP (XSYMBOL (next)->function)))
8333 next = XSYMBOL (next)->function; 8338 next = XSYMBOL (next)->function;
8334 8339
8335 /* If the keymap gives a function, not an 8340 /* If the keymap gives a function, not an
8336 array, then call the function with one arg and use 8341 array, then call the function with one arg and use
8337 its value instead. */ 8342 its value instead. */
@@ -9345,7 +9350,7 @@ read_key_sequence (keybuf, bufsize, prompt, dont_downcase_last,
9345 /* Adjust the function-key-map counters. */ 9350 /* Adjust the function-key-map counters. */
9346 fkey.end += diff; 9351 fkey.end += diff;
9347 fkey.start += diff; 9352 fkey.start += diff;
9348 9353
9349 goto replay_sequence; 9354 goto replay_sequence;
9350 } 9355 }
9351 } 9356 }
@@ -10146,7 +10151,7 @@ On such systems, Emacs starts a subshell instead of suspending. */)
10146 10151
10147 if (tty_list && tty_list->next) 10152 if (tty_list && tty_list->next)
10148 error ("Suspend is not supported with multiple ttys"); 10153 error ("Suspend is not supported with multiple ttys");
10149 10154
10150 if (!NILP (stuffstring)) 10155 if (!NILP (stuffstring))
10151 CHECK_STRING (stuffstring); 10156 CHECK_STRING (stuffstring);
10152 10157
@@ -10280,7 +10285,7 @@ interrupt_signal (signalnum) /* If we don't have an argument, */
10280 else 10285 else
10281 { 10286 {
10282 /* Otherwise, the SIGINT was probably generated by C-g. */ 10287 /* Otherwise, the SIGINT was probably generated by C-g. */
10283 10288
10284 /* Set internal_last_event_frame to the top frame of the 10289 /* Set internal_last_event_frame to the top frame of the
10285 controlling tty, if we have a frame there. We disable the 10290 controlling tty, if we have a frame there. We disable the
10286 interrupt key on secondary ttys, so the SIGINT must have come 10291 interrupt key on secondary ttys, so the SIGINT must have come
@@ -10294,7 +10299,7 @@ interrupt_signal (signalnum) /* If we don't have an argument, */
10294} 10299}
10295 10300
10296/* This routine is called at interrupt level in response to C-g. 10301/* This routine is called at interrupt level in response to C-g.
10297 10302
10298 It is called from the SIGINT handler or kbd_buffer_store_event. 10303 It is called from the SIGINT handler or kbd_buffer_store_event.
10299 10304
10300 If `waiting_for_input' is non zero, then unless `echoing' is 10305 If `waiting_for_input' is non zero, then unless `echoing' is
@@ -10307,7 +10312,7 @@ interrupt_signal (signalnum) /* If we don't have an argument, */
10307static void 10312static void
10308handle_interrupt () 10313handle_interrupt ()
10309{ 10314{
10310 char c; 10315 char c;
10311 struct frame *sf = SELECTED_FRAME (); 10316 struct frame *sf = SELECTED_FRAME ();
10312 10317
10313 cancel_echoing (); 10318 cancel_echoing ();
@@ -10480,7 +10485,7 @@ See also `current-input-mode'. */)
10480 Currently it compiles fine, but its semantics are wrong. It sets 10485 Currently it compiles fine, but its semantics are wrong. It sets
10481 global parameters (e.g. interrupt_input) based on only the 10486 global parameters (e.g. interrupt_input) based on only the
10482 current frame's device. */ 10487 current frame's device. */
10483 10488
10484 if (!NILP (quit) 10489 if (!NILP (quit)
10485 && (!INTEGERP (quit) || XINT (quit) < 0 || XINT (quit) > 0400)) 10490 && (!INTEGERP (quit) || XINT (quit) < 0 || XINT (quit) > 0400))
10486 error ("set-input-mode: QUIT must be an ASCII character"); 10491 error ("set-input-mode: QUIT must be an ASCII character");
@@ -10528,7 +10533,7 @@ See also `current-input-mode'. */)
10528 else 10533 else
10529 tty->meta_key = 2; 10534 tty->meta_key = 2;
10530 } 10535 }
10531 10536
10532 if (!NILP (quit)) 10537 if (!NILP (quit))
10533 /* Don't let this value be out of range. */ 10538 /* Don't let this value be out of range. */
10534 quit_char = XINT (quit) & (NILP (meta) ? 0177 : 0377); 10539 quit_char = XINT (quit) & (NILP (meta) ? 0177 : 0377);
@@ -10562,7 +10567,7 @@ The elements of this list correspond to the arguments of
10562{ 10567{
10563 Lisp_Object val[4]; 10568 Lisp_Object val[4];
10564 struct frame *sf = XFRAME (selected_frame); 10569 struct frame *sf = XFRAME (selected_frame);
10565 10570
10566 val[0] = interrupt_input ? Qt : Qnil; 10571 val[0] = interrupt_input ? Qt : Qnil;
10567 if (FRAME_TERMCAP_P (sf)) 10572 if (FRAME_TERMCAP_P (sf))
10568 { 10573 {
@@ -10671,13 +10676,6 @@ init_keyboard ()
10671 do_mouse_tracking = Qnil; 10676 do_mouse_tracking = Qnil;
10672#endif 10677#endif
10673 input_pending = 0; 10678 input_pending = 0;
10674#ifndef VMS
10675 {
10676 int i;
10677 for (i = 0; i < KBD_BUFFER_SIZE; i++)
10678 EVENT_INIT (read_avail_input_buf[i]);
10679 }
10680#endif
10681 10679
10682 /* This means that command_loop_1 won't try to select anything the first 10680 /* This means that command_loop_1 won't try to select anything the first
10683 time through. */ 10681 time through. */
@@ -11423,7 +11421,7 @@ keys_of_keyboard ()
11423 /* Handling it at such a low-level causes read_key_sequence to get 11421 /* Handling it at such a low-level causes read_key_sequence to get
11424 * confused because it doesn't realize that the current_buffer was 11422 * confused because it doesn't realize that the current_buffer was
11425 * changed by read_char. 11423 * changed by read_char.
11426 * 11424 *
11427 * initial_define_lispy_key (Vspecial_event_map, "select-window", 11425 * initial_define_lispy_key (Vspecial_event_map, "select-window",
11428 * "handle-select-window"); */ 11426 * "handle-select-window"); */
11429 initial_define_lispy_key (Vspecial_event_map, "save-session", 11427 initial_define_lispy_key (Vspecial_event_map, "save-session",
diff --git a/src/lisp.h b/src/lisp.h
index a0bc2af24bb..8affbc76126 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -178,18 +178,13 @@ union Lisp_Object
178 struct 178 struct
179 { 179 {
180 EMACS_INT val : VALBITS; 180 EMACS_INT val : VALBITS;
181 EMACS_UINT type : GCTYPEBITS; 181 enum Lisp_Type type : GCTYPEBITS;
182 } s; 182 } s;
183 struct 183 struct
184 { 184 {
185 EMACS_UINT val : VALBITS; 185 EMACS_UINT val : VALBITS;
186 EMACS_UINT type : GCTYPEBITS; 186 enum Lisp_Type type : GCTYPEBITS;
187 } u; 187 } u;
188 struct
189 {
190 EMACS_UINT val : VALBITS;
191 enum Lisp_Type type : GCTYPEBITS;
192 } gu;
193 } 188 }
194Lisp_Object; 189Lisp_Object;
195 190
@@ -204,19 +199,14 @@ union Lisp_Object
204 199
205 struct 200 struct
206 { 201 {
207 EMACS_UINT type : GCTYPEBITS; 202 enum Lisp_Type type : GCTYPEBITS;
208 EMACS_INT val : VALBITS; 203 EMACS_INT val : VALBITS;
209 } s; 204 } s;
210 struct 205 struct
211 { 206 {
212 EMACS_UINT type : GCTYPEBITS; 207 enum Lisp_Type type : GCTYPEBITS;
213 EMACS_UINT val : VALBITS; 208 EMACS_UINT val : VALBITS;
214 } u; 209 } u;
215 struct
216 {
217 enum Lisp_Type type : GCTYPEBITS;
218 EMACS_UINT val : VALBITS;
219 } gu;
220 } 210 }
221Lisp_Object; 211Lisp_Object;
222 212