diff options
author | Richard M. Stallman <rms@gnu.org> | 2003-01-01 16:59:54 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 2003-01-01 16:59:54 +0000 |
commit | 2764bebdf12634d7af165463cd8e6024bdf5de8e (patch) | |
tree | 95d9523e7373d2e532edc7e6434044654ab65bdc /src/keyboard.c | |
parent | ab233196ba2b58fc2c32f5ec3716fd5fb8f7c2fe (diff) | |
download | emacs-2764bebdf12634d7af165463cd8e6024bdf5de8e.tar.gz |
(command_loop_1): Call adjust_point_for_property
in direct action cases for Qforward_char and Qbackward_char.
Set already_adjusted so it won't be done twice.
Diffstat (limited to 'src/keyboard.c')
-rw-r--r-- | src/keyboard.c | 36 |
1 files changed, 23 insertions, 13 deletions
diff --git a/src/keyboard.c b/src/keyboard.c index f322ed87632..f4593bdfbdd 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -1351,6 +1351,7 @@ command_loop_1 () #ifdef MULTI_KBOARD int was_locked = single_kboard; #endif + int already_adjusted; current_kboard->Vprefix_arg = Qnil; current_kboard->Vlast_prefix_arg = Qnil; @@ -1557,6 +1558,8 @@ command_loop_1 () if (!NILP (Vpre_command_hook) && !NILP (Vrun_hooks)) safe_run_hooks (Qpre_command_hook); + already_adjusted = 0; + if (NILP (Vthis_command)) { /* nil means key is undefined. */ @@ -1580,12 +1583,15 @@ command_loop_1 () = window_display_table (XWINDOW (selected_window)); lose = FETCH_CHAR (PT_BYTE); SET_PT (PT + 1); - if ((dp - ? (VECTORP (DISP_CHAR_VECTOR (dp, lose)) - ? XVECTOR (DISP_CHAR_VECTOR (dp, lose))->size == 1 - : (NILP (DISP_CHAR_VECTOR (dp, lose)) - && (lose >= 0x20 && lose < 0x7f))) - : (lose >= 0x20 && lose < 0x7f)) + adjust_point_for_property (last_point_position); + already_adjusted = 1; + if (PT == last_point_position + 1 + && (dp + ? (VECTORP (DISP_CHAR_VECTOR (dp, lose)) + ? XVECTOR (DISP_CHAR_VECTOR (dp, lose))->size == 1 + : (NILP (DISP_CHAR_VECTOR (dp, lose)) + && (lose >= 0x20 && lose < 0x7f))) + : (lose >= 0x20 && lose < 0x7f)) /* To extract the case of continuation on wide-column characters. */ && (WIDTH_BY_CHAR_HEAD (FETCH_BYTE (PT_BYTE)) == 1) @@ -1609,12 +1615,15 @@ command_loop_1 () = window_display_table (XWINDOW (selected_window)); SET_PT (PT - 1); lose = FETCH_CHAR (PT_BYTE); - if ((dp - ? (VECTORP (DISP_CHAR_VECTOR (dp, lose)) - ? XVECTOR (DISP_CHAR_VECTOR (dp, lose))->size == 1 - : (NILP (DISP_CHAR_VECTOR (dp, lose)) - && (lose >= 0x20 && lose < 0x7f))) - : (lose >= 0x20 && lose < 0x7f)) + adjust_point_for_property (last_point_position); + already_adjusted = 1; + if (PT == last_point_position - 1 + && (dp + ? (VECTORP (DISP_CHAR_VECTOR (dp, lose)) + ? XVECTOR (DISP_CHAR_VECTOR (dp, lose))->size == 1 + : (NILP (DISP_CHAR_VECTOR (dp, lose)) + && (lose >= 0x20 && lose < 0x7f))) + : (lose >= 0x20 && lose < 0x7f)) && (XFASTINT (XWINDOW (selected_window)->last_modified) >= MODIFF) && (XFASTINT (XWINDOW (selected_window)->last_overlay_modified) @@ -1769,7 +1778,8 @@ command_loop_1 () if (current_buffer == prev_buffer && last_point_position != PT && NILP (Vdisable_point_adjustment) - && NILP (Vglobal_disable_point_adjustment)) + && NILP (Vglobal_disable_point_adjustment) + && !already_adjusted) adjust_point_for_property (last_point_position); /* Install chars successfully executed in kbd macro. */ |