Mercurial > emacs
changeset 49059:435da46787dd
(apropos_predicate, apropos_accumulate): Make them static.
(syms_of_keymap): staticpro them.
(Fapropos_internal): Initialize them and clear them out.
Don't GCPRO them.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Mon, 06 Jan 2003 00:53:47 +0000 |
parents | d96550be16ab |
children | c396307cb60b |
files | src/keymap.c |
diffstat | 1 files changed, 11 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- 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. */