summaryrefslogtreecommitdiff
path: root/src/cmds.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2011-03-06 01:00:53 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2011-03-06 01:00:53 -0800
commit1e12733b25bfa52650157c34fc30a9c7fe1d5b4c (patch)
tree614fc78c9717d5814c7eb56a5b531e6bb9849742 /src/cmds.c
parentacbfe54c07f24929f584ba9e29baf4401ee4bfd9 (diff)
downloademacs-1e12733b25bfa52650157c34fc30a9c7fe1d5b4c.tar.gz
* cmds.c (internal_self_insert): Reindent to match Emacs style.
Diffstat (limited to 'src/cmds.c')
-rw-r--r--src/cmds.c33
1 files changed, 17 insertions, 16 deletions
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)
int target_clm = ((int) current_column () /* iftc */
+ n * (int) XINT (Fchar_width (make_number (c))));
- /* The actual cursor position after the trial of moving
- to column TARGET_CLM. It is greater than TARGET_CLM
- if the TARGET_CLM is middle of multi-column
- character. In that case, the new point is set after
- that character. */
- int actual_clm
- = (int) XFASTINT (Fmove_to_column (make_number (target_clm),
- Qnil));
-
- chars_to_delete = PT - pos;
-
- if (actual_clm > target_clm)
- { /* We will delete too many columns. Let's fill columns
- by spaces so that the remaining text won't move. */
+ /* The actual cursor position after the trial of moving
+ to column TARGET_CLM. It is greater than TARGET_CLM
+ if the TARGET_CLM is middle of multi-column
+ character. In that case, the new point is set after
+ that character. */
+ int actual_clm
+ = (int) XFASTINT (Fmove_to_column (make_number (target_clm),
+ Qnil));
+
+ chars_to_delete = PT - pos;
+
+ if (actual_clm > target_clm)
+ {
+ /* We will delete too many columns. Let's fill columns
+ by spaces so that the remaining text won't move. */
EMACS_INT actual = PT_BYTE;
DEC_POS (actual);
if (FETCH_CHAR (actual) == '\t')
/* Rather than add spaces, let's just keep the tab. */
chars_to_delete--;
else
- spaces_to_insert = actual_clm - target_clm;
- }
+ spaces_to_insert = actual_clm - target_clm;
+ }
SET_PT_BOTH (pos, pos_byte);
}