aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorStefan Monnier2007-08-13 04:06:31 +0000
committerStefan Monnier2007-08-13 04:06:31 +0000
commit1bc99c9c789039e19c3f31b2807b58cf6588283a (patch)
tree00653e7680ac7d516f4b707ed69657fdd8f9a8dc /src
parent4a1813592741a9f9c9e940117d7bc9737a26ed2b (diff)
downloademacs-1bc99c9c789039e19c3f31b2807b58cf6588283a.tar.gz
emacs-1bc99c9c789039e19c3f31b2807b58cf6588283a.zip
(Finsert_file_contents): Yet Another Int/Lisp_Object Mixup.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog2
-rw-r--r--src/fileio.c14
2 files changed, 8 insertions, 8 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 51bf583fcee..c97fec64808 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,7 @@
12007-08-13 Stefan Monnier <monnier@iro.umontreal.ca> 12007-08-13 Stefan Monnier <monnier@iro.umontreal.ca>
2 2
3 * fileio.c (Finsert_file_contents): Yet Another Int/Lisp_Object Mixup.
4
3 * insdel.c (reset_var_on_error): New fun. 5 * insdel.c (reset_var_on_error): New fun.
4 (signal_before_change, signal_after_change): 6 (signal_before_change, signal_after_change):
5 Use it to reset (after|before)-change-functions to nil in case of error. 7 Use it to reset (after|before)-change-functions to nil in case of error.
diff --git a/src/fileio.c b/src/fileio.c
index 6037eec5d7d..195e76db658 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -4738,7 +4738,7 @@ variable `last-coding-system-used' to the coding system actually used. */)
4738 insval = call3 (Qformat_decode, 4738 insval = call3 (Qformat_decode,
4739 Qnil, make_number (oinserted), visit); 4739 Qnil, make_number (oinserted), visit);
4740 CHECK_NUMBER (insval); 4740 CHECK_NUMBER (insval);
4741 if (insval = oinserted) 4741 if (XINT (insval) == oinserted)
4742 SET_PT_BOTH (opoint, opoint_byte); 4742 SET_PT_BOTH (opoint, opoint_byte);
4743 inserted = XFASTINT (insval); 4743 inserted = XFASTINT (insval);
4744 } 4744 }
@@ -4769,7 +4769,7 @@ variable `last-coding-system-used' to the coding system actually used. */)
4769 if (!NILP (insval)) 4769 if (!NILP (insval))
4770 { 4770 {
4771 CHECK_NUMBER (insval); 4771 CHECK_NUMBER (insval);
4772 if (insval = oinserted) 4772 if (XINT (insval) == oinserted)
4773 SET_PT_BOTH (opoint, opoint_byte); 4773 SET_PT_BOTH (opoint, opoint_byte);
4774 inserted = XFASTINT (insval); 4774 inserted = XFASTINT (insval);
4775 } 4775 }
@@ -4788,18 +4788,16 @@ variable `last-coding-system-used' to the coding system actually used. */)
4788 { 4788 {
4789 Lisp_Object tem = XCAR (old_undo); 4789 Lisp_Object tem = XCAR (old_undo);
4790 if (CONSP (tem) && INTEGERP (XCAR (tem)) && 4790 if (CONSP (tem) && INTEGERP (XCAR (tem)) &&
4791 INTEGERP (XCDR (tem)) && (XCAR (tem)) == lbeg) 4791 INTEGERP (XCDR (tem)) && EQ (XCAR (tem), lbeg))
4792 /* In the non-visiting case record only the final insertion. */ 4792 /* In the non-visiting case record only the final insertion. */
4793 current_buffer->undo_list = 4793 current_buffer->undo_list =
4794 Fcons (Fcons (lbeg, lend), Fcdr (old_undo)); 4794 Fcons (Fcons (lbeg, lend), Fcdr (old_undo));
4795 } 4795 }
4796 } 4796 }
4797 else if (old_undo == Qt)
4798 /* If undo_list was Qt before, keep it that way. */
4799 current_buffer->undo_list = Qt;
4800 else 4797 else
4801 /* Otherwise start with an empty undo_list. */ 4798 /* If undo_list was Qt before, keep it that way.
4802 current_buffer->undo_list = Qnil; 4799 Otherwise start with an empty undo_list. */
4800 current_buffer->undo_list = EQ (old_undo, Qt) ? Qt : Qnil;
4803 4801
4804 unbind_to (count, Qnil); 4802 unbind_to (count, Qnil);
4805 } 4803 }