diff options
| author | Stefan Monnier | 2005-04-12 22:52:52 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2005-04-12 22:52:52 +0000 |
| commit | 203eb0aa1d75155378080885ad4a1123fe355ba8 (patch) | |
| tree | 599b6e2c1fd13d5eb6e67026942b93c4e9e599a3 /src | |
| parent | dc56fc01ff1ff4950432c445ac0325920a70d6e4 (diff) | |
| download | emacs-203eb0aa1d75155378080885ad4a1123fe355ba8.tar.gz emacs-203eb0aa1d75155378080885ad4a1123fe355ba8.zip | |
(Fset_window_configuration): Be careful when you choose
among several possible points for the new_current_buffer.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 23 | ||||
| -rw-r--r-- | src/window.c | 19 |
2 files changed, 29 insertions, 13 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 2b3d6a0e5e0..9a439dff8ca 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,22 +1,25 @@ | |||
| 1 | 2005-04-12 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * window.c (Fset_window_configuration): Be careful when you choose | ||
| 4 | among several possible points for the new_current_buffer. | ||
| 5 | |||
| 1 | 2005-04-12 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | 6 | 2005-04-12 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> |
| 2 | 7 | ||
| 3 | * keyboard.c (poll_for_input) [SYNC_INPUT]: Don't call | 8 | * keyboard.c (poll_for_input) [SYNC_INPUT]: Don't call |
| 4 | poll_for_input_1. Set interrupt_input_pending to 1 instead. | 9 | poll_for_input_1. Set interrupt_input_pending to 1 instead. |
| 5 | (Qlanguage_change) [MAC_OS]: New variable. | 10 | (Qlanguage_change) [MAC_OS]: New variable. |
| 6 | (syms_of_keyboard) [MAC_OS]: Intern and staticpro it. | 11 | (syms_of_keyboard) [MAC_OS]: Intern and staticpro it. |
| 7 | (kbd_buffer_get_event) [MAC_OS]: Make event for | 12 | (kbd_buffer_get_event) [MAC_OS]: Make event for LANGUAGE_CHANGE_EVENT. |
| 8 | LANGUAGE_CHANGE_EVENT. | ||
| 9 | 13 | ||
| 10 | * macterm.c (mac_keyboard_text_encoding) | 14 | * macterm.c (mac_keyboard_text_encoding) |
| 11 | (current_mac_keyboard_text_encoding): Remove variables. | 15 | (current_mac_keyboard_text_encoding): Remove variables. |
| 12 | (XTread_socket): Store language-change event if keyboard script | 16 | (XTread_socket): Store language-change event if keyboard script |
| 13 | change is detected. Don't convert input to | 17 | change is detected. Don't convert input to |
| 14 | `mac_keyboard_text_encoding'. | 18 | `mac_keyboard_text_encoding'. |
| 15 | (syms_of_macterm): Delete DEFVAR_INT for | 19 | (syms_of_macterm): Delete DEFVAR_INT for mac-keyboard-text-encoding. |
| 16 | mac-keyboard-text-encoding. | ||
| 17 | 20 | ||
| 18 | * termhooks.h (enum event_kind) [MAC_OS]: Add | 21 | * termhooks.h (enum event_kind) [MAC_OS]: |
| 19 | LANGUAGE_CHANGE_EVENT. | 22 | Add LANGUAGE_CHANGE_EVENT. |
| 20 | 23 | ||
| 21 | 2005-04-10 Richard M. Stallman <rms@gnu.org> | 24 | 2005-04-10 Richard M. Stallman <rms@gnu.org> |
| 22 | 25 | ||
| @@ -68,8 +71,8 @@ | |||
| 68 | * mac.c (cfdate_to_lisp): Add `const' for variable `epoch_gdate'. | 71 | * mac.c (cfdate_to_lisp): Add `const' for variable `epoch_gdate'. |
| 69 | (Fmac_get_preference): Doc fix. | 72 | (Fmac_get_preference): Doc fix. |
| 70 | 73 | ||
| 71 | * macfns.c (Fx_create_frame, x_create_tip_frame): Add | 74 | * macfns.c (Fx_create_frame, x_create_tip_frame): |
| 72 | "fontset-mac" to fallback font/fontsets. | 75 | Add "fontset-mac" to fallback font/fontsets. |
| 73 | 76 | ||
| 74 | 2005-04-04 Kim F. Storm <storm@cua.dk> | 77 | 2005-04-04 Kim F. Storm <storm@cua.dk> |
| 75 | 78 | ||
| @@ -100,8 +103,8 @@ | |||
| 100 | Vascii_downcase_table. | 103 | Vascii_downcase_table. |
| 101 | (fast_string_match_ignore_case): Likewise. | 104 | (fast_string_match_ignore_case): Likewise. |
| 102 | (search_buffer): Fix checking of boyer-moore usability. | 105 | (search_buffer): Fix checking of boyer-moore usability. |
| 103 | (boyer_moore): Calculate translate_prev_byte1/2/3 in advance. No | 106 | (boyer_moore): Calculate translate_prev_byte1/2/3 in advance. |
| 104 | need of tranlating characters in PAT. Fix calculation of | 107 | No need of tranlating characters in PAT. Fix calculation of |
| 105 | simple_translate. | 108 | simple_translate. |
| 106 | 109 | ||
| 107 | 2005-03-31 Stefan Monnier <monnier@iro.umontreal.ca> | 110 | 2005-03-31 Stefan Monnier <monnier@iro.umontreal.ca> |
diff --git a/src/window.c b/src/window.c index 988b663cbba..1070f8cf37c 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | /* Window creation, deletion and examination for GNU Emacs. | 1 | /* Window creation, deletion and examination for GNU Emacs. |
| 2 | Does not include redisplay. | 2 | Does not include redisplay. |
| 3 | Copyright (C) 1985,86,87, 1993,94,95,96,97,98, 2000,01,02,03,04 | 3 | Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1996, 1997, 1998, 2000, |
| 4 | Free Software Foundation, Inc. | 4 | 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | This file is part of GNU Emacs. | 6 | This file is part of GNU Emacs. |
| 7 | 7 | ||
| @@ -5594,7 +5594,20 @@ the return value is nil. Otherwise the value is t. */) | |||
| 5594 | if (XBUFFER (new_current_buffer) == current_buffer) | 5594 | if (XBUFFER (new_current_buffer) == current_buffer) |
| 5595 | old_point = PT; | 5595 | old_point = PT; |
| 5596 | else | 5596 | else |
| 5597 | old_point = BUF_PT (XBUFFER (new_current_buffer)); | 5597 | /* BUF_PT (XBUFFER (new_current_buffer)) gives us the position of |
| 5598 | point in new_current_buffer as of the last time this buffer was | ||
| 5599 | used. This can be non-deterministic since it can be changed by | ||
| 5600 | things like jit-lock by mere temporary selection of some random | ||
| 5601 | window that happens to show this buffer. | ||
| 5602 | So if possible we want this arbitrary choice of "which point" to | ||
| 5603 | be the one from the to-be-selected-window so as to prevent this | ||
| 5604 | window's cursor from being copied from another window. */ | ||
| 5605 | if (EQ (XWINDOW (data->current_window)->buffer, new_current_buffer) | ||
| 5606 | /* If current_window = selected_window, its point is in BUF_PT. */ | ||
| 5607 | && !EQ (selected_window, data->current_window)) | ||
| 5608 | old_point = XMARKER (XWINDOW (data->current_window)->pointm)->charpos; | ||
| 5609 | else | ||
| 5610 | old_point = BUF_PT (XBUFFER (new_current_buffer)); | ||
| 5598 | } | 5611 | } |
| 5599 | 5612 | ||
| 5600 | frame = XWINDOW (SAVED_WINDOW_N (saved_windows, 0)->window)->frame; | 5613 | frame = XWINDOW (SAVED_WINDOW_N (saved_windows, 0)->window)->frame; |