Mercurial > hg > xemacs-beta
comparison src/undo.c @ 70:131b0175ea99 r20-0b30
Import from CVS: tag r20-0b30
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:02:59 +0200 |
parents | 56c54cf7c5b6 |
children | 85ec50267440 |
comparison
equal
deleted
inserted
replaced
69:804d1389bcd6 | 70:131b0175ea99 |
---|---|
204 deletion; this call is solely for Fdetach_extent() and Finsert_extent(). | 204 deletion; this call is solely for Fdetach_extent() and Finsert_extent(). |
205 */ | 205 */ |
206 void | 206 void |
207 record_extent (Lisp_Object extent, int attached) | 207 record_extent (Lisp_Object extent, int attached) |
208 { | 208 { |
209 Lisp_Object obj = Fextent_object (extent); | 209 Lisp_Object buffer = Fextent_object (extent); |
210 | 210 struct buffer *b = XBUFFER (buffer); /* !!#### */ |
211 if (BUFFERP (obj)) | 211 Lisp_Object token; |
212 { | 212 |
213 Lisp_Object token; | 213 if (!undo_prelude (b, 1)) |
214 struct buffer *b = XBUFFER (obj); | 214 return; |
215 if (!undo_prelude (b, 1)) | 215 |
216 return; | 216 if (attached) |
217 if (attached) | 217 token = extent; |
218 token = extent; | |
219 else | |
220 token = list3 (extent, Fextent_start_position (extent), | |
221 Fextent_end_position (extent)); | |
222 b->undo_list = Fcons (token, b->undo_list); | |
223 } | |
224 else | 218 else |
225 return; | 219 token = list3 (extent, Fextent_start_position (extent), |
220 Fextent_end_position (extent)); | |
221 b->undo_list = Fcons (token, b->undo_list); | |
226 } | 222 } |
227 | 223 |
228 #if 0 /* FSFmacs */ | 224 #if 0 /* FSFmacs */ |
229 /* Record a change in property PROP (whose old value was VAL) | 225 /* Record a change in property PROP (whose old value was VAL) |
230 for LENGTH characters starting at position BEG in BUFFER. */ | 226 for LENGTH characters starting at position BEG in BUFFER. */ |