diff options
author | Richard M. Stallman <rms@gnu.org> | 1994-05-06 00:48:26 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1994-05-06 00:48:26 +0000 |
commit | 047688cbac14dc76bb4970c8ddefbca1d5a763e3 (patch) | |
tree | 3fdf4265a5aedc395553a3664ffa9cddbb3a940c /src | |
parent | c1e6740184ef8e07a50ee54788871d57bf4c142d (diff) | |
download | emacs-047688cbac14dc76bb4970c8ddefbca1d5a763e3.tar.gz emacs-047688cbac14dc76bb4970c8ddefbca1d5a763e3.tar.bz2 emacs-047688cbac14dc76bb4970c8ddefbca1d5a763e3.zip |
(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.
Diffstat (limited to 'src')
-rw-r--r-- | src/keyboard.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/keyboard.c b/src/keyboard.c index 561e77a8c1e..94cbb26464e 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -235,6 +235,9 @@ Lisp_Object this_command; /* 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 @@ command_loop_1 () 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 @@ make_lispy_movement (frame, bar_window, part, x, y, time) 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; |