comparison src/keyboard.c @ 54087:5a946bc3433a

Fix whitespace.
author Kim F. Storm <storm@cua.dk>
date Thu, 19 Feb 2004 23:26:06 +0000
parents 86e93d3ccc6e
children 53604473a699 55d4fe5962fd
comparison
equal deleted inserted replaced
54086:86e93d3ccc6e 54087:5a946bc3433a
4983 } 4983 }
4984 else if (part == ON_LEFT_MARGIN || part == ON_RIGHT_MARGIN) 4984 else if (part == ON_LEFT_MARGIN || part == ON_RIGHT_MARGIN)
4985 { 4985 {
4986 Lisp_Object string; 4986 Lisp_Object string;
4987 int charpos; 4987 int charpos;
4988 4988
4989 posn = (part == ON_LEFT_MARGIN) ? Qleft_margin : Qright_margin; 4989 posn = (part == ON_LEFT_MARGIN) ? Qleft_margin : Qright_margin;
4990 rx = wx, ry = wy; 4990 rx = wx, ry = wy;
4991 string = marginal_area_string (w, part, &rx, &ry, &charpos, 4991 string = marginal_area_string (w, part, &rx, &ry, &charpos,
4992 &object, &dx, &dy, &width, &height); 4992 &object, &dx, &dy, &width, &height);
4993 if (STRINGP (string)) 4993 if (STRINGP (string))
5466 5466
5467 case WHEEL_EVENT: 5467 case WHEEL_EVENT:
5468 { 5468 {
5469 Lisp_Object position; 5469 Lisp_Object position;
5470 Lisp_Object head; 5470 Lisp_Object head;
5471 5471
5472 /* Build the position as appropriate for this mouse click. */ 5472 /* Build the position as appropriate for this mouse click. */
5473 struct frame *f = XFRAME (event->frame_or_window); 5473 struct frame *f = XFRAME (event->frame_or_window);
5474 5474
5475 /* Ignore wheel events that were made on frame that have been 5475 /* Ignore wheel events that were made on frame that have been
5476 deleted. */ 5476 deleted. */
6571 Typically, there are just a few available input events to be read 6571 Typically, there are just a few available input events to be read
6572 here, so we really don't need to allocate and initialize a big 6572 here, so we really don't need to allocate and initialize a big
6573 buffer of input_events as we used to do. Instead, we just allocate 6573 buffer of input_events as we used to do. Instead, we just allocate
6574 a small buffer of input events -- and then poll for more input if we 6574 a small buffer of input events -- and then poll for more input if we
6575 read a full buffer of input events. */ 6575 read a full buffer of input events. */
6576
6576 #define NREAD_INPUT_EVENTS 8 6577 #define NREAD_INPUT_EVENTS 8
6577 6578
6578 static int 6579 static int
6579 read_avail_input (expected) 6580 read_avail_input (expected)
6580 int expected; 6581 int expected;
6585 if (read_socket_hook) 6586 if (read_socket_hook)
6586 { 6587 {
6587 int discard = 0; 6588 int discard = 0;
6588 int nr; 6589 int nr;
6589 6590
6590
6591 do { 6591 do {
6592 struct input_event buf[NREAD_INPUT_EVENTS]; 6592 struct input_event buf[NREAD_INPUT_EVENTS];
6593 6593
6594 for (i = 0; i < NREAD_INPUT_EVENTS; i++) 6594 for (i = 0; i < NREAD_INPUT_EVENTS; i++)
6595 EVENT_INIT (buf[i]); 6595 EVENT_INIT (buf[i]);
6724 cbuf[i] &= ~0x80; 6724 cbuf[i] &= ~0x80;
6725 6725
6726 buf.code = cbuf[i]; 6726 buf.code = cbuf[i];
6727 buf.frame_or_window = selected_frame; 6727 buf.frame_or_window = selected_frame;
6728 buf.arg = Qnil; 6728 buf.arg = Qnil;
6729 6729
6730 kbd_buffer_store_event (&buf); 6730 kbd_buffer_store_event (&buf);
6731 /* Don't look at input that follows a C-g too closely. 6731 /* Don't look at input that follows a C-g too closely.
6732 This reduces lossage due to autorepeat on C-g. */ 6732 This reduces lossage due to autorepeat on C-g. */
6733 if (buf.kind == ASCII_KEYSTROKE_EVENT 6733 if (buf.kind == ASCII_KEYSTROKE_EVENT
6734 && buf.code == quit_char) 6734 && buf.code == quit_char)
8266 access_keymap_keyremap (map, key, prompt, do_funcall) 8266 access_keymap_keyremap (map, key, prompt, do_funcall)
8267 Lisp_Object map, key, prompt; 8267 Lisp_Object map, key, prompt;
8268 int do_funcall; 8268 int do_funcall;
8269 { 8269 {
8270 Lisp_Object next; 8270 Lisp_Object next;
8271 8271
8272 next = access_keymap (map, key, 1, 0, 1); 8272 next = access_keymap (map, key, 1, 0, 1);
8273 8273
8274 /* Handle symbol with autoload definition. */ 8274 /* Handle symbol with autoload definition. */
8275 if (SYMBOLP (next) && !NILP (Ffboundp (next)) 8275 if (SYMBOLP (next) && !NILP (Ffboundp (next))
8276 && CONSP (XSYMBOL (next)->function) 8276 && CONSP (XSYMBOL (next)->function)
8281 or an array. */ 8281 or an array. */
8282 if (SYMBOLP (next) && !NILP (Ffboundp (next)) 8282 if (SYMBOLP (next) && !NILP (Ffboundp (next))
8283 && (!NILP (Farrayp (XSYMBOL (next)->function)) 8283 && (!NILP (Farrayp (XSYMBOL (next)->function))
8284 || KEYMAPP (XSYMBOL (next)->function))) 8284 || KEYMAPP (XSYMBOL (next)->function)))
8285 next = XSYMBOL (next)->function; 8285 next = XSYMBOL (next)->function;
8286 8286
8287 /* If the keymap gives a function, not an 8287 /* If the keymap gives a function, not an
8288 array, then call the function with one arg and use 8288 array, then call the function with one arg and use
8289 its value instead. */ 8289 its value instead. */
8290 if (SYMBOLP (next) && !NILP (Ffboundp (next)) && do_funcall) 8290 if (SYMBOLP (next) && !NILP (Ffboundp (next)) && do_funcall)
8291 { 8291 {
9295 { 9295 {
9296 mock_input = diff + max (t, mock_input); 9296 mock_input = diff + max (t, mock_input);
9297 /* Adjust the function-key-map counters. */ 9297 /* Adjust the function-key-map counters. */
9298 fkey.end += diff; 9298 fkey.end += diff;
9299 fkey.start += diff; 9299 fkey.start += diff;
9300 9300
9301 goto replay_sequence; 9301 goto replay_sequence;
9302 } 9302 }
9303 } 9303 }
9304 9304
9305 /* If KEY is not defined in any of the keymaps, 9305 /* If KEY is not defined in any of the keymaps,
11303 initial_define_lispy_key (Vspecial_event_map, "make-frame-visible", 11303 initial_define_lispy_key (Vspecial_event_map, "make-frame-visible",
11304 "ignore-event"); 11304 "ignore-event");
11305 /* Handling it at such a low-level causes read_key_sequence to get 11305 /* Handling it at such a low-level causes read_key_sequence to get
11306 * confused because it doesn't realize that the current_buffer was 11306 * confused because it doesn't realize that the current_buffer was
11307 * changed by read_char. 11307 * changed by read_char.
11308 * 11308 *
11309 * initial_define_lispy_key (Vspecial_event_map, "select-window", 11309 * initial_define_lispy_key (Vspecial_event_map, "select-window",
11310 * "handle-select-window"); */ 11310 * "handle-select-window"); */
11311 initial_define_lispy_key (Vspecial_event_map, "save-session", 11311 initial_define_lispy_key (Vspecial_event_map, "save-session",
11312 "handle-save-session"); 11312 "handle-save-session");
11313 } 11313 }