comparison src/symbols.c @ 363:972bbb6d6ca2 r21-1-11

Import from CVS: tag r21-1-11
author cvs
date Mon, 13 Aug 2007 10:59:28 +0200
parents 8bec6624d99b
children cc15677e0335
comparison
equal deleted inserted replaced
362:1e474c183006 363:972bbb6d6ca2
409 Call FUNCTION on every symbol in OBARRAY. 409 Call FUNCTION on every symbol in OBARRAY.
410 OBARRAY defaults to the value of `obarray'. 410 OBARRAY defaults to the value of `obarray'.
411 */ 411 */
412 (function, obarray)) 412 (function, obarray))
413 { 413 {
414 struct gcpro gcpro1;
415
414 if (NILP (obarray)) 416 if (NILP (obarray))
415 obarray = Vobarray; 417 obarray = Vobarray;
416 obarray = check_obarray (obarray); 418 obarray = check_obarray (obarray);
417 419
420 GCPRO1 (obarray);
418 map_obarray (obarray, mapatoms_1, &function); 421 map_obarray (obarray, mapatoms_1, &function);
422 UNGCPRO;
419 return Qnil; 423 return Qnil;
420 } 424 }
421 425
422 426
423 /**********************************************************************/ 427 /**********************************************************************/
455 Return list of symbols found. 459 Return list of symbols found.
456 */ 460 */
457 (regexp, predicate)) 461 (regexp, predicate))
458 { 462 {
459 struct appropos_mapper_closure closure; 463 struct appropos_mapper_closure closure;
464 struct gcpro gcpro1;
460 465
461 CHECK_STRING (regexp); 466 CHECK_STRING (regexp);
462 467
463 closure.regexp = regexp; 468 closure.regexp = regexp;
464 closure.predicate = predicate; 469 closure.predicate = predicate;
465 closure.accumulation = Qnil; 470 closure.accumulation = Qnil;
471 GCPRO1 (closure.accumulation);
466 map_obarray (Vobarray, apropos_mapper, &closure); 472 map_obarray (Vobarray, apropos_mapper, &closure);
467 closure.accumulation = Fsort (closure.accumulation, Qstring_lessp); 473 closure.accumulation = Fsort (closure.accumulation, Qstring_lessp);
474 UNGCPRO;
468 return closure.accumulation; 475 return closure.accumulation;
469 } 476 }
470 477
471 478
472 /* Extract and set components of symbols */ 479 /* Extract and set components of symbols */