comparison src/specifier.c @ 404:2f8bb876ab1d r21-2-32

Import from CVS: tag r21-2-32
author cvs
date Mon, 13 Aug 2007 11:16:07 +0200
parents a86b2b5e0111
children 501cfd01ee6d
comparison
equal deleted inserted replaced
403:9f011ab08d48 404:2f8bb876ab1d
541 particular domain (i.e. how their value in that domain is determined), 541 particular domain (i.e. how their value in that domain is determined),
542 see the chapter on specifiers in the XEmacs Lisp Reference Manual. 542 see the chapter on specifiers in the XEmacs Lisp Reference Manual.
543 543
544 TYPE specifies the particular type of specifier, and should be one of 544 TYPE specifies the particular type of specifier, and should be one of
545 the symbols 'generic, 'integer, 'boolean, 'color, 'font, 'image, 545 the symbols 'generic, 'integer, 'boolean, 'color, 'font, 'image,
546 'face-boolean, or 'toolbar. 546 'face-boolean, 'gutter, 'gutter-size, 'gutter-visible or 'toolbar.
547 547
548 For more information on particular types of specifiers, see the functions 548 For more information on particular types of specifiers, see the
549 `generic-specifier-p', `integer-specifier-p', `boolean-specifier-p', 549 functions `generic-specifier-p', `integer-specifier-p',
550 `color-specifier-p', `font-specifier-p', `image-specifier-p', 550 `boolean-specifier-p', `color-specifier-p', `font-specifier-p',
551 `face-boolean-specifier-p', and `toolbar-specifier-p'. 551 `image-specifier-p', `face-boolean-specifier-p', `gutter-specifier-p,
552 `gutter-size-specifier-p, `gutter-visible-specifier-p and
553 `toolbar-specifier-p'.
552 */ 554 */
553 (type)) 555 (type))
554 { 556 {
555 /* This function can GC */ 557 /* This function can GC */
556 struct specifier_methods *meths = decode_specifier_type (type, 558 struct specifier_methods *meths = decode_specifier_type (type,
2814 better be able to deal. If not, set a default so this 2816 better be able to deal. If not, set a default so this
2815 never happens or correct it in the value_changed_in_window 2817 never happens or correct it in the value_changed_in_window
2816 method. */ 2818 method. */
2817 location = (Lisp_Object *) 2819 location = (Lisp_Object *)
2818 ((char *) w + XSPECIFIER (specifier)->caching->offset_into_struct_window); 2820 ((char *) w + XSPECIFIER (specifier)->caching->offset_into_struct_window);
2821 /* #### What's the point of this check, other than to optimize image
2822 instance instantiation? Unless you specify a caching instantiate
2823 method the instantiation that specifier_instance will do will
2824 always create a new copy. Thus EQ will always fail. Unfortunately
2825 calling equal is no good either as this doesn't take into account
2826 things attached to the specifier - for instance strings on
2827 extents. --andyp */
2819 if (!EQ (newval, *location)) 2828 if (!EQ (newval, *location))
2820 { 2829 {
2821 Lisp_Object oldval = *location; 2830 Lisp_Object oldval = *location;
2822 *location = newval; 2831 *location = newval;
2823 (XSPECIFIER (specifier)->caching->value_changed_in_window) 2832 (XSPECIFIER (specifier)->caching->value_changed_in_window)