From 5d55ffd05d2e689f6a2b249d94270c966bac7c72 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Mon, 6 Jan 2003 00:53:47 +0000 Subject: [PATCH] (apropos_predicate, apropos_accumulate): Make them static. (syms_of_keymap): staticpro them. (Fapropos_internal): Initialize them and clear them out. Don't GCPRO them. --- src/keymap.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/keymap.c b/src/keymap.c index 6e5eec90eef..2f8a44cfb3d 100644 --- a/src/keymap.c +++ b/src/keymap.c @@ -3467,8 +3467,8 @@ describe_vector (vector, elt_prefix, args, elt_describer, } /* 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 @@ Return list of symbols found. */) (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 @@ syms_of_keymap () { 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. */ -- 2.11.4.GIT