diff options
| author | Paul Eggert | 2011-03-06 01:00:53 -0800 |
|---|---|---|
| committer | Paul Eggert | 2011-03-06 01:00:53 -0800 |
| commit | 1e12733b25bfa52650157c34fc30a9c7fe1d5b4c (patch) | |
| tree | 614fc78c9717d5814c7eb56a5b531e6bb9849742 /src | |
| parent | acbfe54c07f24929f584ba9e29baf4401ee4bfd9 (diff) | |
| download | emacs-1e12733b25bfa52650157c34fc30a9c7fe1d5b4c.tar.gz emacs-1e12733b25bfa52650157c34fc30a9c7fe1d5b4c.zip | |
* cmds.c (internal_self_insert): Reindent to match Emacs style.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 2 | ||||
| -rw-r--r-- | src/cmds.c | 33 |
2 files changed, 19 insertions, 16 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 6321786bee4..357bb9a37a8 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,5 +1,7 @@ | |||
| 1 | 2011-03-06 Paul Eggert <eggert@cs.ucla.edu> | 1 | 2011-03-06 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 2 | ||
| 3 | * cmds.c (internal_self_insert): Reindent to match Emacs style. | ||
| 4 | |||
| 3 | * xdisp.c: Rename or move local decls to avoid shadowing. | 5 | * xdisp.c: Rename or move local decls to avoid shadowing. |
| 4 | (init_iterator, handle_fontified_prop, handle_single_display_spec): | 6 | (init_iterator, handle_fontified_prop, handle_single_display_spec): |
| 5 | (message_dolog, message_with_string, redisplay_internal): | 7 | (message_dolog, message_with_string, redisplay_internal): |
diff --git a/src/cmds.c b/src/cmds.c index 336bf1154f9..7e0eec99bef 100644 --- a/src/cmds.c +++ b/src/cmds.c | |||
| @@ -386,28 +386,29 @@ internal_self_insert (int c, EMACS_INT n) | |||
| 386 | int target_clm = ((int) current_column () /* iftc */ | 386 | int target_clm = ((int) current_column () /* iftc */ |
| 387 | + n * (int) XINT (Fchar_width (make_number (c)))); | 387 | + n * (int) XINT (Fchar_width (make_number (c)))); |
| 388 | 388 | ||
| 389 | /* The actual cursor position after the trial of moving | 389 | /* The actual cursor position after the trial of moving |
| 390 | to column TARGET_CLM. It is greater than TARGET_CLM | 390 | to column TARGET_CLM. It is greater than TARGET_CLM |
| 391 | if the TARGET_CLM is middle of multi-column | 391 | if the TARGET_CLM is middle of multi-column |
| 392 | character. In that case, the new point is set after | 392 | character. In that case, the new point is set after |
| 393 | that character. */ | 393 | that character. */ |
| 394 | int actual_clm | 394 | int actual_clm |
| 395 | = (int) XFASTINT (Fmove_to_column (make_number (target_clm), | 395 | = (int) XFASTINT (Fmove_to_column (make_number (target_clm), |
| 396 | Qnil)); | 396 | Qnil)); |
| 397 | 397 | ||
| 398 | chars_to_delete = PT - pos; | 398 | chars_to_delete = PT - pos; |
| 399 | 399 | ||
| 400 | if (actual_clm > target_clm) | 400 | if (actual_clm > target_clm) |
| 401 | { /* We will delete too many columns. Let's fill columns | 401 | { |
| 402 | by spaces so that the remaining text won't move. */ | 402 | /* We will delete too many columns. Let's fill columns |
| 403 | by spaces so that the remaining text won't move. */ | ||
| 403 | EMACS_INT actual = PT_BYTE; | 404 | EMACS_INT actual = PT_BYTE; |
| 404 | DEC_POS (actual); | 405 | DEC_POS (actual); |
| 405 | if (FETCH_CHAR (actual) == '\t') | 406 | if (FETCH_CHAR (actual) == '\t') |
| 406 | /* Rather than add spaces, let's just keep the tab. */ | 407 | /* Rather than add spaces, let's just keep the tab. */ |
| 407 | chars_to_delete--; | 408 | chars_to_delete--; |
| 408 | else | 409 | else |
| 409 | spaces_to_insert = actual_clm - target_clm; | 410 | spaces_to_insert = actual_clm - target_clm; |
| 410 | } | 411 | } |
| 411 | 412 | ||
| 412 | SET_PT_BOTH (pos, pos_byte); | 413 | SET_PT_BOTH (pos, pos_byte); |
| 413 | } | 414 | } |