# HG changeset patch # User Richard M. Stallman # Date 768185306 0 # Node ID c107ec7641ecc6783e40a0daa586258abfcbad73 # Parent 17a251bf595bf99c820ba8eac6399497130036cf (last_point_position_buffer): New variable. (command_loop_1): Set it. (make_lispy_movement): Don't call pixel_to_glyph_coords if FRAME is 0. diff -r 17a251bf595b -r c107ec7641ec src/keyboard.c --- a/src/keyboard.c Fri May 06 00:32:58 1994 +0000 +++ b/src/keyboard.c Fri May 06 00:48:26 1994 +0000 @@ -235,6 +235,9 @@ /* The value of point when the last command was executed. */ int last_point_position; +/* The buffer that was current when the last command was started. */ +Lisp_Object last_point_position_buffer; + #ifdef MULTI_FRAME /* The frame in which the last input event occurred, or Qmacro if the last event came from a macro. We use this to determine when to @@ -1048,6 +1051,7 @@ prev_buffer = current_buffer; prev_modiff = MODIFF; last_point_position = PT; + XSET (last_point_position_buffer, Lisp_Buffer, prev_buffer); /* Execute the command. */ @@ -2767,10 +2771,12 @@ Lisp_Object posn; int column, row; - pixel_to_glyph_coords (frame, XINT (x), XINT (y), &column, &row, 0, 1); - if (frame) - window = window_from_coordinates (frame, column, row, &area); + { + /* It's in a frame; which window on that frame? */ + pixel_to_glyph_coords (frame, XINT (x), XINT (y), &column, &row, 0, 1); + window = window_from_coordinates (frame, column, row, &area); + } else window = Qnil;