The following patch should assert that FROM is "correct" when `after-change-functions' is called (without any warranty).
*** insdel.c Sat Nov 5 20:46:36 2005 --- insdel.c Sat Dec 17 18:22:00 2005 *************** *** 749,757 **** { if (nbytes > 0) { ! int opoint = PT; ! insert_1 (string, nbytes, 0, 1, 0); ! signal_after_change (opoint, 0, PT - opoint); update_compositions (opoint, PT, CHECK_BORDER); } } --- 749,758 ---- { if (nbytes > 0) { ! int len = chars_in_text (string, nbytes), opoint; ! insert_1_both (string, len, nbytes, 0, 1, 0); ! opoint = PT - len; ! signal_after_change (opoint, 0, len); update_compositions (opoint, PT, CHECK_BORDER); } } *************** *** 765,773 **** { if (nbytes > 0) { ! int opoint = PT; ! insert_1 (string, nbytes, 1, 1, 0); ! signal_after_change (opoint, 0, PT - opoint); update_compositions (opoint, PT, CHECK_BORDER); } } --- 766,775 ---- { if (nbytes > 0) { ! int len = chars_in_text (string, nbytes), opoint; ! insert_1_both (string, len, nbytes, 1, 1, 0); ! opoint = PT - len; ! signal_after_change (opoint, 0, len); update_compositions (opoint, PT, CHECK_BORDER); } } *************** *** 813,822 **** { if (nbytes > 0) { ! int opoint = PT; ! ! insert_1 (string, nbytes, 0, 1, 1); ! signal_after_change (opoint, 0, PT - opoint); update_compositions (opoint, PT, CHECK_BORDER); } } --- 815,824 ---- { if (nbytes > 0) { ! int len = chars_in_text (string, nbytes), opoint; ! insert_1_both (string, len, nbytes, 0, 1, 1); ! opoint = PT - len; ! signal_after_change (opoint, 0, len); update_compositions (opoint, PT, CHECK_BORDER); } } *************** *** 830,839 **** { if (nbytes > 0) { ! int opoint = PT; ! ! insert_1 (string, nbytes, 1, 1, 1); ! signal_after_change (opoint, 0, PT - opoint); update_compositions (opoint, PT, CHECK_BORDER); } } --- 832,841 ---- { if (nbytes > 0) { ! int len = chars_in_text (string, nbytes), opoint; ! insert_1_both (string, len, nbytes, 1, 1, 1); ! opoint = PT - len; ! signal_after_change (opoint, 0, len); update_compositions (opoint, PT, CHECK_BORDER); } } _______________________________________________ emacs-pretest-bug mailing list emacs-pretest-bug@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug