comparison src/textprop.c @ 16103:4962e89ec8ef

(set_properties, add_properties, remove_properties): Call modify_region with ints.
author Richard M. Stallman <rms@gnu.org>
date Wed, 04 Sep 1996 03:35:53 +0000
parents a17752d2b0c0
children 32a51f7ba384
comparison
equal deleted inserted replaced
16102:76bd16bb5906 16103:4962e89ec8ef
298 sym = XCONS (value)->cdr) 298 sym = XCONS (value)->cdr)
299 if (! EQ (property_value (properties, XCONS (sym)->car), 299 if (! EQ (property_value (properties, XCONS (sym)->car),
300 XCONS (value)->car)) 300 XCONS (value)->car))
301 { 301 {
302 modify_region (XBUFFER (object), 302 modify_region (XBUFFER (object),
303 make_number (interval->position), 303 interval->position,
304 make_number (interval->position + LENGTH (interval))); 304 interval->position + LENGTH (interval));
305 record_property_change (interval->position, LENGTH (interval), 305 record_property_change (interval->position, LENGTH (interval),
306 XCONS (sym)->car, XCONS (value)->car, 306 XCONS (sym)->car, XCONS (value)->car,
307 object); 307 object);
308 signal_after_change (interval->position, LENGTH (interval), 308 signal_after_change (interval->position, LENGTH (interval),
309 LENGTH (interval)); 309 LENGTH (interval));
315 PLIST_ELT_P (sym, value); 315 PLIST_ELT_P (sym, value);
316 sym = XCONS (value)->cdr) 316 sym = XCONS (value)->cdr)
317 if (EQ (property_value (interval->plist, XCONS (sym)->car), Qunbound)) 317 if (EQ (property_value (interval->plist, XCONS (sym)->car), Qunbound))
318 { 318 {
319 modify_region (XBUFFER (object), 319 modify_region (XBUFFER (object),
320 make_number (interval->position), 320 interval->position,
321 make_number (interval->position + LENGTH (interval))); 321 interval->position + LENGTH (interval));
322 record_property_change (interval->position, LENGTH (interval), 322 record_property_change (interval->position, LENGTH (interval),
323 XCONS (sym)->car, Qnil, 323 XCONS (sym)->car, Qnil,
324 object); 324 object);
325 signal_after_change (interval->position, LENGTH (interval), 325 signal_after_change (interval->position, LENGTH (interval),
326 LENGTH (interval)); 326 LENGTH (interval));
385 385
386 /* Record this change in the buffer, for undo purposes. */ 386 /* Record this change in the buffer, for undo purposes. */
387 if (BUFFERP (object)) 387 if (BUFFERP (object))
388 { 388 {
389 modify_region (XBUFFER (object), 389 modify_region (XBUFFER (object),
390 make_number (i->position), 390 i->position,
391 make_number (i->position + LENGTH (i))); 391 i->position + LENGTH (i));
392 record_property_change (i->position, LENGTH (i), 392 record_property_change (i->position, LENGTH (i),
393 sym1, Fcar (this_cdr), object); 393 sym1, Fcar (this_cdr), object);
394 signal_after_change (i->position, LENGTH (i), LENGTH (i)); 394 signal_after_change (i->position, LENGTH (i), LENGTH (i));
395 } 395 }
396 396
404 { 404 {
405 /* Record this change in the buffer, for undo purposes. */ 405 /* Record this change in the buffer, for undo purposes. */
406 if (BUFFERP (object)) 406 if (BUFFERP (object))
407 { 407 {
408 modify_region (XBUFFER (object), 408 modify_region (XBUFFER (object),
409 make_number (i->position), 409 i->position,
410 make_number (i->position + LENGTH (i))); 410 i->position + LENGTH (i));
411 record_property_change (i->position, LENGTH (i), 411 record_property_change (i->position, LENGTH (i),
412 sym1, Qnil, object); 412 sym1, Qnil, object);
413 signal_after_change (i->position, LENGTH (i), LENGTH (i)); 413 signal_after_change (i->position, LENGTH (i), LENGTH (i));
414 } 414 }
415 i->plist = Fcons (sym1, Fcons (val1, i->plist)); 415 i->plist = Fcons (sym1, Fcons (val1, i->plist));
445 while (! NILP (current_plist) && EQ (sym, Fcar (current_plist))) 445 while (! NILP (current_plist) && EQ (sym, Fcar (current_plist)))
446 { 446 {
447 if (BUFFERP (object)) 447 if (BUFFERP (object))
448 { 448 {
449 modify_region (XBUFFER (object), 449 modify_region (XBUFFER (object),
450 make_number (i->position), 450 i->position,
451 make_number (i->position + LENGTH (i))); 451 i->position + LENGTH (i));
452 record_property_change (i->position, LENGTH (i), 452 record_property_change (i->position, LENGTH (i),
453 sym, Fcar (Fcdr (current_plist)), 453 sym, Fcar (Fcdr (current_plist)),
454 object); 454 object);
455 signal_after_change (i->position, LENGTH (i), LENGTH (i)); 455 signal_after_change (i->position, LENGTH (i), LENGTH (i));
456 } 456 }
468 if (EQ (sym, Fcar (this))) 468 if (EQ (sym, Fcar (this)))
469 { 469 {
470 if (BUFFERP (object)) 470 if (BUFFERP (object))
471 { 471 {
472 modify_region (XBUFFER (object), 472 modify_region (XBUFFER (object),
473 make_number (i->position), 473 i->position,
474 make_number (i->position + LENGTH (i))); 474 i->position + LENGTH (i));
475 record_property_change (i->position, LENGTH (i), 475 record_property_change (i->position, LENGTH (i),
476 sym, Fcar (Fcdr (this)), object); 476 sym, Fcar (Fcdr (this)), object);
477 signal_after_change (i->position, LENGTH (i), LENGTH (i)); 477 signal_after_change (i->position, LENGTH (i), LENGTH (i));
478 } 478 }
479 479