diff options
| author | Richard M. Stallman | 2005-12-26 16:31:36 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2005-12-26 16:31:36 +0000 |
| commit | bb0e1d19c7388910c113441dc131a85977e8b8ee (patch) | |
| tree | c7f08fcf479bb52f0a58f1cb1669e21de9cadee2 /src | |
| parent | 066185fc2e3ec9465a7ecfad83de2ad69c8c22aa (diff) | |
| download | emacs-bb0e1d19c7388910c113441dc131a85977e8b8ee.tar.gz emacs-bb0e1d19c7388910c113441dc131a85977e8b8ee.zip | |
(last_point_position_window): New variable.
(command_loop_1): Set last_point_position_window.
(syms_of_keyboard): Init it.
Diffstat (limited to 'src')
| -rw-r--r-- | src/keyboard.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/keyboard.c b/src/keyboard.c index 57646f1b0c2..aaeeeade541 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -381,12 +381,15 @@ Lisp_Object real_this_command; | |||
| 381 | command is stored in this-original-command. It is nil otherwise. */ | 381 | command is stored in this-original-command. It is nil otherwise. */ |
| 382 | Lisp_Object Vthis_original_command; | 382 | Lisp_Object Vthis_original_command; |
| 383 | 383 | ||
| 384 | /* The value of point when the last command was executed. */ | 384 | /* The value of point when the last command was started. */ |
| 385 | int last_point_position; | 385 | int last_point_position; |
| 386 | 386 | ||
| 387 | /* The buffer that was current when the last command was started. */ | 387 | /* The buffer that was current when the last command was started. */ |
| 388 | Lisp_Object last_point_position_buffer; | 388 | Lisp_Object last_point_position_buffer; |
| 389 | 389 | ||
| 390 | /* The window that was selected when the last command was started. */ | ||
| 391 | Lisp_Object last_point_position_window; | ||
| 392 | |||
| 390 | /* The frame in which the last input event occurred, or Qmacro if the | 393 | /* The frame in which the last input event occurred, or Qmacro if the |
| 391 | last event came from a macro. We use this to determine when to | 394 | last event came from a macro. We use this to determine when to |
| 392 | generate switch-frame events. This may be cleared by functions | 395 | generate switch-frame events. This may be cleared by functions |
| @@ -1581,6 +1584,7 @@ command_loop_1 () | |||
| 1581 | prev_buffer = current_buffer; | 1584 | prev_buffer = current_buffer; |
| 1582 | prev_modiff = MODIFF; | 1585 | prev_modiff = MODIFF; |
| 1583 | last_point_position = PT; | 1586 | last_point_position = PT; |
| 1587 | last_point_position_window = selected_window; | ||
| 1584 | XSETBUFFER (last_point_position_buffer, prev_buffer); | 1588 | XSETBUFFER (last_point_position_buffer, prev_buffer); |
| 1585 | 1589 | ||
| 1586 | /* By default, we adjust point to a boundary of a region that | 1590 | /* By default, we adjust point to a boundary of a region that |
| @@ -10985,6 +10989,7 @@ syms_of_keyboard () | |||
| 10985 | Fset (Qinput_method_use_echo_area, Qnil); | 10989 | Fset (Qinput_method_use_echo_area, Qnil); |
| 10986 | 10990 | ||
| 10987 | last_point_position_buffer = Qnil; | 10991 | last_point_position_buffer = Qnil; |
| 10992 | last_point_position_window = Qnil; | ||
| 10988 | 10993 | ||
| 10989 | { | 10994 | { |
| 10990 | struct event_head *p; | 10995 | struct event_head *p; |