Avoid calls to CHAR_TO_BYTE if byte position is known.
authorDmitry Antipov <dmantipov@yandex.ru>
Thu, 20 Dec 2012 16:09:05 +0000 (20:09 +0400)
committerDmitry Antipov <dmantipov@yandex.ru>
Thu, 20 Dec 2012 16:09:05 +0000 (20:09 +0400)
commit13002885275be0499d0131d4d1823d5e5a6a1be6
tree533c02f80d9a86b08aef35c2499e948ef0236f17
parent99e9311c311ec85dfb8a56d560e3d2f27abc430d
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.
src/ChangeLog
src/editfns.c
src/fileio.c
src/indent.c
src/insdel.c
src/lisp.h
src/marker.c
src/process.c
src/search.c