diff options
| author | Richard M. Stallman | 2003-01-01 16:59:54 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2003-01-01 16:59:54 +0000 |
| commit | 2764bebdf12634d7af165463cd8e6024bdf5de8e (patch) | |
| tree | 95d9523e7373d2e532edc7e6434044654ab65bdc | |
| parent | ab233196ba2b58fc2c32f5ec3716fd5fb8f7c2fe (diff) | |
| download | emacs-2764bebdf12634d7af165463cd8e6024bdf5de8e.tar.gz emacs-2764bebdf12634d7af165463cd8e6024bdf5de8e.zip | |
(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.
| -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 () | |||
| 1351 | #ifdef MULTI_KBOARD | 1351 | #ifdef MULTI_KBOARD |
| 1352 | int was_locked = single_kboard; | 1352 | int was_locked = single_kboard; |
| 1353 | #endif | 1353 | #endif |
| 1354 | int already_adjusted; | ||
| 1354 | 1355 | ||
| 1355 | current_kboard->Vprefix_arg = Qnil; | 1356 | current_kboard->Vprefix_arg = Qnil; |
| 1356 | current_kboard->Vlast_prefix_arg = Qnil; | 1357 | current_kboard->Vlast_prefix_arg = Qnil; |
| @@ -1557,6 +1558,8 @@ command_loop_1 () | |||
| 1557 | if (!NILP (Vpre_command_hook) && !NILP (Vrun_hooks)) | 1558 | if (!NILP (Vpre_command_hook) && !NILP (Vrun_hooks)) |
| 1558 | safe_run_hooks (Qpre_command_hook); | 1559 | safe_run_hooks (Qpre_command_hook); |
| 1559 | 1560 | ||
| 1561 | already_adjusted = 0; | ||
| 1562 | |||
| 1560 | if (NILP (Vthis_command)) | 1563 | if (NILP (Vthis_command)) |
| 1561 | { | 1564 | { |
| 1562 | /* nil means key is undefined. */ | 1565 | /* nil means key is undefined. */ |
| @@ -1580,12 +1583,15 @@ command_loop_1 () | |||
| 1580 | = window_display_table (XWINDOW (selected_window)); | 1583 | = window_display_table (XWINDOW (selected_window)); |
| 1581 | lose = FETCH_CHAR (PT_BYTE); | 1584 | lose = FETCH_CHAR (PT_BYTE); |
| 1582 | SET_PT (PT + 1); | 1585 | SET_PT (PT + 1); |
| 1583 | if ((dp | 1586 | adjust_point_for_property (last_point_position); |
| 1584 | ? (VECTORP (DISP_CHAR_VECTOR (dp, lose)) | 1587 | already_adjusted = 1; |
| 1585 | ? XVECTOR (DISP_CHAR_VECTOR (dp, lose))->size == 1 | 1588 | if (PT == last_point_position + 1 |
| 1586 | : (NILP (DISP_CHAR_VECTOR (dp, lose)) | 1589 | && (dp |
| 1587 | && (lose >= 0x20 && lose < 0x7f))) | 1590 | ? (VECTORP (DISP_CHAR_VECTOR (dp, lose)) |
| 1588 | : (lose >= 0x20 && lose < 0x7f)) | 1591 | ? XVECTOR (DISP_CHAR_VECTOR (dp, lose))->size == 1 |
| 1592 | : (NILP (DISP_CHAR_VECTOR (dp, lose)) | ||
| 1593 | && (lose >= 0x20 && lose < 0x7f))) | ||
| 1594 | : (lose >= 0x20 && lose < 0x7f)) | ||
| 1589 | /* To extract the case of continuation on | 1595 | /* To extract the case of continuation on |
| 1590 | wide-column characters. */ | 1596 | wide-column characters. */ |
| 1591 | && (WIDTH_BY_CHAR_HEAD (FETCH_BYTE (PT_BYTE)) == 1) | 1597 | && (WIDTH_BY_CHAR_HEAD (FETCH_BYTE (PT_BYTE)) == 1) |
| @@ -1609,12 +1615,15 @@ command_loop_1 () | |||
| 1609 | = window_display_table (XWINDOW (selected_window)); | 1615 | = window_display_table (XWINDOW (selected_window)); |
| 1610 | SET_PT (PT - 1); | 1616 | SET_PT (PT - 1); |
| 1611 | lose = FETCH_CHAR (PT_BYTE); | 1617 | lose = FETCH_CHAR (PT_BYTE); |
| 1612 | if ((dp | 1618 | adjust_point_for_property (last_point_position); |
| 1613 | ? (VECTORP (DISP_CHAR_VECTOR (dp, lose)) | 1619 | already_adjusted = 1; |
| 1614 | ? XVECTOR (DISP_CHAR_VECTOR (dp, lose))->size == 1 | 1620 | if (PT == last_point_position - 1 |
| 1615 | : (NILP (DISP_CHAR_VECTOR (dp, lose)) | 1621 | && (dp |
| 1616 | && (lose >= 0x20 && lose < 0x7f))) | 1622 | ? (VECTORP (DISP_CHAR_VECTOR (dp, lose)) |
| 1617 | : (lose >= 0x20 && lose < 0x7f)) | 1623 | ? XVECTOR (DISP_CHAR_VECTOR (dp, lose))->size == 1 |
| 1624 | : (NILP (DISP_CHAR_VECTOR (dp, lose)) | ||
| 1625 | && (lose >= 0x20 && lose < 0x7f))) | ||
| 1626 | : (lose >= 0x20 && lose < 0x7f)) | ||
| 1618 | && (XFASTINT (XWINDOW (selected_window)->last_modified) | 1627 | && (XFASTINT (XWINDOW (selected_window)->last_modified) |
| 1619 | >= MODIFF) | 1628 | >= MODIFF) |
| 1620 | && (XFASTINT (XWINDOW (selected_window)->last_overlay_modified) | 1629 | && (XFASTINT (XWINDOW (selected_window)->last_overlay_modified) |
| @@ -1769,7 +1778,8 @@ command_loop_1 () | |||
| 1769 | if (current_buffer == prev_buffer | 1778 | if (current_buffer == prev_buffer |
| 1770 | && last_point_position != PT | 1779 | && last_point_position != PT |
| 1771 | && NILP (Vdisable_point_adjustment) | 1780 | && NILP (Vdisable_point_adjustment) |
| 1772 | && NILP (Vglobal_disable_point_adjustment)) | 1781 | && NILP (Vglobal_disable_point_adjustment) |
| 1782 | && !already_adjusted) | ||
| 1773 | adjust_point_for_property (last_point_position); | 1783 | adjust_point_for_property (last_point_position); |
| 1774 | 1784 | ||
| 1775 | /* Install chars successfully executed in kbd macro. */ | 1785 | /* Install chars successfully executed in kbd macro. */ |