Mercurial > hg > xemacs-beta
comparison src/undo.c @ 284:558f606b08ae r21-0b40
Import from CVS: tag r21-0b40
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:34:13 +0200 |
parents | 2c611d1463a6 |
children | 6240c7796c7a |
comparison
equal
deleted
inserted
replaced
283:fa3d41851a08 | 284:558f606b08ae |
---|---|
74 { | 74 { |
75 if (EQ (b->undo_list, Qt)) | 75 if (EQ (b->undo_list, Qt)) |
76 return (0); | 76 return (0); |
77 | 77 |
78 if (NILP (last_undo_buffer) || b != XBUFFER (last_undo_buffer)) | 78 if (NILP (last_undo_buffer) || b != XBUFFER (last_undo_buffer)) |
79 { | 79 { |
80 undo_boundary (b); | 80 undo_boundary (b); |
81 XSETBUFFER (last_undo_buffer, b); | 81 XSETBUFFER (last_undo_buffer, b); |
82 } | 82 } |
83 | 83 |
84 /* Allocate a cons cell to be the undo boundary after this command. */ | 84 /* Allocate a cons cell to be the undo boundary after this command. */ |
85 if (hack_pending_boundary && NILP (pending_boundary)) | 85 if (hack_pending_boundary && NILP (pending_boundary)) |
86 pending_boundary = Fcons (Qnil, Qnil); | 86 pending_boundary = Fcons (Qnil, Qnil); |
87 | 87 |
88 if (BUF_MODIFF (b) <= BUF_SAVE_MODIFF (b)) | 88 if (BUF_MODIFF (b) <= BUF_SAVE_MODIFF (b)) |
89 { | 89 { |
90 /* Record that an unmodified buffer is about to be changed. | 90 /* Record that an unmodified buffer is about to be changed. |
91 Record the file modification date so that when undoing this entry | 91 Record the file modification date so that when undoing this |
92 we can tell whether it is obsolete because the file was saved again. */ | 92 entry we can tell whether it is obsolete because the file was |
93 b->undo_list | 93 saved again. */ |
94 = Fcons (Fcons (Qt, | 94 b->undo_list |
95 Fcons (make_int ((b->modtime >> 16) & 0xffff), | 95 = Fcons (Fcons (Qt, |
96 make_int (b->modtime & 0xffff))), | 96 Fcons (make_int ((b->modtime >> 16) & 0xffff), |
97 b->undo_list); | 97 make_int (b->modtime & 0xffff))), |
98 } | 98 b->undo_list); |
99 return (1); | 99 } |
100 return 1; | |
100 } | 101 } |
101 | 102 |
102 | 103 |
103 | 104 |
104 static Lisp_Object | 105 static Lisp_Object |
523 Fdetach_extent (next); | 524 Fdetach_extent (next); |
524 else | 525 else |
525 { | 526 { |
526 rotten: | 527 rotten: |
527 signal_simple_continuable_error | 528 signal_simple_continuable_error |
528 ("Something rotten in the state of undo:", next); | 529 ("Something rotten in the state of undo", next); |
529 } | 530 } |
530 } | 531 } |
531 arg--; | 532 arg--; |
532 } | 533 } |
533 | 534 |