comparison src/specifier.c @ 434:9d177e8d4150 r21-2-25

Import from CVS: tag r21-2-25
author cvs
date Mon, 13 Aug 2007 11:30:53 +0200
parents 3ecd8885ac67
children 8de8e3f6228a
comparison
equal deleted inserted replaced
433:892ca416f0fb 434:9d177e8d4150
1646 1646
1647 GCPRO1 (list_to_build_up); 1647 GCPRO1 (list_to_build_up);
1648 LIST_LOOP (rest, inst_list) 1648 LIST_LOOP (rest, inst_list)
1649 { 1649 {
1650 Lisp_Object tag_set = XCAR (XCAR (rest)); 1650 Lisp_Object tag_set = XCAR (XCAR (rest));
1651 Lisp_Object instantiator = Fcopy_tree (XCDR (XCAR (rest)), Qt);
1652 Lisp_Object sub_inst_list = Qnil; 1651 Lisp_Object sub_inst_list = Qnil;
1652 Lisp_Object instantiator;
1653 struct gcpro ngcpro1, ngcpro2; 1653 struct gcpro ngcpro1, ngcpro2;
1654
1655 if (HAS_SPECMETH_P (sp, copy_instantiator))
1656 instantiator = SPECMETH (sp, copy_instantiator,
1657 (XCDR (XCAR (rest))));
1658 else
1659 instantiator = Fcopy_tree (XCDR (XCAR (rest)), Qt);
1654 1660
1655 NGCPRO2 (instantiator, sub_inst_list); 1661 NGCPRO2 (instantiator, sub_inst_list);
1656 /* call the will-add method; it may GC */ 1662 /* call the will-add method; it may GC */
1657 sub_inst_list = HAS_SPECMETH_P (sp, going_to_add) ? 1663 sub_inst_list = HAS_SPECMETH_P (sp, going_to_add) ?
1658 SPECMETH (sp, going_to_add, 1664 SPECMETH (sp, going_to_add,
2537 from Lisp). */ 2543 from Lisp). */
2538 depth = Qzero; 2544 depth = Qzero;
2539 goto do_fallback; 2545 goto do_fallback;
2540 } 2546 }
2541 2547
2542 retry: 2548 retry:
2543 /* First see if we can generate one from the window specifiers. */ 2549 /* First see if we can generate one from the window specifiers. */
2544 if (!NILP (window)) 2550 if (!NILP (window))
2545 CHECK_INSTANCE_ENTRY (window, matchspec, LOCALE_WINDOW); 2551 CHECK_INSTANCE_ENTRY (window, matchspec, LOCALE_WINDOW);
2546 2552
2547 /* Next see if we can generate one from the buffer specifiers. */ 2553 /* Next see if we can generate one from the buffer specifiers. */
2556 CHECK_INSTANCE_ENTRY (device, matchspec, LOCALE_DEVICE); 2562 CHECK_INSTANCE_ENTRY (device, matchspec, LOCALE_DEVICE);
2557 2563
2558 /* Last and least try the global specifiers. */ 2564 /* Last and least try the global specifiers. */
2559 CHECK_INSTANCE_ENTRY (Qglobal, matchspec, LOCALE_GLOBAL); 2565 CHECK_INSTANCE_ENTRY (Qglobal, matchspec, LOCALE_GLOBAL);
2560 2566
2561 do_fallback: 2567 do_fallback:
2562 /* We're out of specifiers and we still haven't generated an 2568 /* We're out of specifiers and we still haven't generated an
2563 instance. At least try the fallback ... If this fails, 2569 instance. At least try the fallback ... If this fails,
2564 then we just return Qunbound. */ 2570 then we just return Qunbound. */
2565 2571
2566 if (no_fallback || NILP (sp->fallback)) 2572 if (no_fallback || NILP (sp->fallback))