Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
1e12733b
Commit
1e12733b
authored
Mar 06, 2011
by
Paul Eggert
Browse files
* cmds.c (internal_self_insert): Reindent to match Emacs style.
parent
acbfe54c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
16 deletions
+19
-16
src/ChangeLog
src/ChangeLog
+2
-0
src/cmds.c
src/cmds.c
+17
-16
No files found.
src/ChangeLog
View file @
1e12733b
2011-03-06 Paul Eggert <eggert@cs.ucla.edu>
2011-03-06 Paul Eggert <eggert@cs.ucla.edu>
* cmds.c (internal_self_insert): Reindent to match Emacs style.
* xdisp.c: Rename or move local decls to avoid shadowing.
* xdisp.c: Rename or move local decls to avoid shadowing.
(init_iterator, handle_fontified_prop, handle_single_display_spec):
(init_iterator, handle_fontified_prop, handle_single_display_spec):
(message_dolog, message_with_string, redisplay_internal):
(message_dolog, message_with_string, redisplay_internal):
src/cmds.c
View file @
1e12733b
...
@@ -386,28 +386,29 @@ internal_self_insert (int c, EMACS_INT n)
...
@@ -386,28 +386,29 @@ internal_self_insert (int c, EMACS_INT n)
int
target_clm
=
((
int
)
current_column
()
/* iftc */
int
target_clm
=
((
int
)
current_column
()
/* iftc */
+
n
*
(
int
)
XINT
(
Fchar_width
(
make_number
(
c
))));
+
n
*
(
int
)
XINT
(
Fchar_width
(
make_number
(
c
))));
/* The actual cursor position after the trial of moving
/* The actual cursor position after the trial of moving
to column TARGET_CLM. It is greater than TARGET_CLM
to column TARGET_CLM. It is greater than TARGET_CLM
if the TARGET_CLM is middle of multi-column
if the TARGET_CLM is middle of multi-column
character. In that case, the new point is set after
character. In that case, the new point is set after
that character. */
that character. */
int
actual_clm
int
actual_clm
=
(
int
)
XFASTINT
(
Fmove_to_column
(
make_number
(
target_clm
),
=
(
int
)
XFASTINT
(
Fmove_to_column
(
make_number
(
target_clm
),
Qnil
));
Qnil
));
chars_to_delete
=
PT
-
pos
;
chars_to_delete
=
PT
-
pos
;
if
(
actual_clm
>
target_clm
)
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. */
/* 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
;
EMACS_INT
actual
=
PT_BYTE
;
DEC_POS
(
actual
);
DEC_POS
(
actual
);
if
(
FETCH_CHAR
(
actual
)
==
'\t'
)
if
(
FETCH_CHAR
(
actual
)
==
'\t'
)
/* Rather than add spaces, let's just keep the tab. */
/* Rather than add spaces, let's just keep the tab. */
chars_to_delete
--
;
chars_to_delete
--
;
else
else
spaces_to_insert
=
actual_clm
-
target_clm
;
spaces_to_insert
=
actual_clm
-
target_clm
;
}
}
SET_PT_BOTH
(
pos
,
pos_byte
);
SET_PT_BOTH
(
pos
,
pos_byte
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment