Avoid character to byte conversions in motion subroutines.
authorDmitry Antipov <dmantipov@yandex.ru>
Thu, 7 Mar 2013 04:42:59 +0000 (08:42 +0400)
committerDmitry Antipov <dmantipov@yandex.ru>
Thu, 7 Mar 2013 04:42:59 +0000 (08:42 +0400)
commitc54aa1668ec5c2626b3f9a84513b00d90dcf24c1
tree0277b558a7de2dece38c62056884d4bfdec8b2b3
parent3de717bdb483f7c6e23cd7701ee4ebd77eccb8b9
Avoid character to byte conversions in motion subroutines.
* indent.h (compute_motion, vmotion): Add byte position argument.
* indent.c (compute_motion): Use it and avoid CHAR_TO_BYTE.
Add eassert.
(Fcompute_motion): Break long line.  Adjust call to compute_motion.
Use list5 for return value.
(vmotion): Use byte position argument and avoid call to CHAR_TO_BYTE.
Adjust comments, style and calls to compute_motion.
(Fvertical_motion): Adjust call to vmotion.
* window.c (Fdelete_other_windows_internal): Record window start
byte position and adjust call to vmotion.
(window_scroll_line_based): Likewise with call to compute_motion.
Use SET_PT_BOTH.
(Frecenter): Adjust calls to vmotion.
src/ChangeLog
src/indent.c
src/indent.h
src/window.c