diff options
author | Dmitry Antipov <dmantipov@yandex.ru> | 2012-12-20 20:09:05 +0400 |
---|---|---|
committer | Dmitry Antipov <dmantipov@yandex.ru> | 2012-12-20 20:09:05 +0400 |
commit | 13002885275be0499d0131d4d1823d5e5a6a1be6 (patch) | |
tree | 533c02f80d9a86b08aef35c2499e948ef0236f17 /src/insdel.c | |
parent | 99e9311c311ec85dfb8a56d560e3d2f27abc430d (diff) |
Avoid calls to CHAR_TO_BYTE if byte position is known.
* editfns.c (make_buffer_string_both): Use move_gap_both.
(Fbuffer_string): Use make_buffer_string_both.
* marker.c (buf_charpos_to_bytepos): Convert to eassert.
Adjust comment.
(buf_bytepos_to_charpos): Likewise.
(charpos_to_bytepos): Remove.
* fileio.c (Finsert_file_contents): Use move_gap_both.
* search.c (Freplace_match): Likewise.
* process.c (process_send_region): Likewise. Use convenient
names for byte positions.
* lisp.h (charpos_to_bytepos): Remove prototype.
* indent.c (scan_for_column): Use CHAR_TO_BYTE.
* insdel.c (move_gap): Likewise.
Diffstat (limited to 'src/insdel.c')
-rw-r--r-- | src/insdel.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/insdel.c b/src/insdel.c index 74e938c4b8..f9eff889bd 100644 --- a/src/insdel.c +++ b/src/insdel.c @@ -90,7 +90,7 @@ check_markers (void) void move_gap (ptrdiff_t charpos) { - move_gap_both (charpos, charpos_to_bytepos (charpos)); + move_gap_both (charpos, CHAR_TO_BYTE (charpos)); } /* Move gap to byte position BYTEPOS, which is also char position CHARPOS. |