Mercurial > hg > xemacs-beta
comparison src/undo.c @ 167:85ec50267440 r20-3b10
Import from CVS: tag r20-3b10
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:45:46 +0200 |
parents | 131b0175ea99 |
children | 3d6bfa290dbd |
comparison
equal
deleted
inserted
replaced
166:7a77eb660975 | 167:85ec50267440 |
---|---|
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 buffer = Fextent_object (extent); | 209 Lisp_Object obj = Fextent_object (extent); |
210 struct buffer *b = XBUFFER (buffer); /* !!#### */ | 210 |
211 Lisp_Object token; | 211 if (BUFFERP (obj)) |
212 | 212 { |
213 if (!undo_prelude (b, 1)) | 213 Lisp_Object token; |
214 struct buffer *b = XBUFFER (obj); | |
215 if (!undo_prelude (b, 1)) | |
216 return; | |
217 if (attached) | |
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 | |
214 return; | 225 return; |
215 | |
216 if (attached) | |
217 token = extent; | |
218 else | |
219 token = list3 (extent, Fextent_start_position (extent), | |
220 Fextent_end_position (extent)); | |
221 b->undo_list = Fcons (token, b->undo_list); | |
222 } | 226 } |
223 | 227 |
224 #if 0 /* FSFmacs */ | 228 #if 0 /* FSFmacs */ |
225 /* Record a change in property PROP (whose old value was VAL) | 229 /* Record a change in property PROP (whose old value was VAL) |
226 for LENGTH characters starting at position BEG in BUFFER. */ | 230 for LENGTH characters starting at position BEG in BUFFER. */ |