# HG changeset patch # User Richard M. Stallman # Date 1041814427 0 # Node ID 435da46787dd07bfa1853f89c0d8410df983055b # Parent d96550be16ab71d42184ce94371b50f58c560f63 (apropos_predicate, apropos_accumulate): Make them static. (syms_of_keymap): staticpro them. (Fapropos_internal): Initialize them and clear them out. Don't GCPRO them. diff -r d96550be16ab -r 435da46787dd src/keymap.c --- a/src/keymap.c Mon Jan 06 00:50:38 2003 +0000 +++ b/src/keymap.c Mon Jan 06 00:53:47 2003 +0000 @@ -3467,8 +3467,8 @@ } /* Apropos - finding all symbols whose names match a regexp. */ -Lisp_Object apropos_predicate; -Lisp_Object apropos_accumulate; +static Lisp_Object apropos_predicate; +static Lisp_Object apropos_accumulate; static void apropos_accum (symbol, string) @@ -3491,15 +3491,16 @@ (regexp, predicate) Lisp_Object regexp, predicate; { + Lisp_Object tem; struct gcpro gcpro1, gcpro2; CHECK_STRING (regexp); apropos_predicate = predicate; - GCPRO2 (apropos_predicate, apropos_accumulate); apropos_accumulate = Qnil; map_obarray (Vobarray, apropos_accum, regexp); - apropos_accumulate = Fsort (apropos_accumulate, Qstring_lessp); - UNGCPRO; - return apropos_accumulate; + tem = Fsort (apropos_accumulate, Qstring_lessp); + apropos_accumulate = Qnil; + apropos_predicate = Qnil; + return tem; } void @@ -3507,6 +3508,10 @@ { Qkeymap = intern ("keymap"); staticpro (&Qkeymap); + staticpro (&apropos_predicate); + staticpro (&apropos_accumulate); + apropos_predicate = Qnil; + apropos_accumulate = Qnil; /* Now we are ready to set up this property, so we can create char tables. */