aboutsummaryrefslogtreecommitdiffstats
path: root/src/keymap.c
diff options
context:
space:
mode:
authorRichard M. Stallman2003-01-06 00:53:47 +0000
committerRichard M. Stallman2003-01-06 00:53:47 +0000
commit5d55ffd05d2e689f6a2b249d94270c966bac7c72 (patch)
tree8bcd978bead1ff569b762ac3d554422ca77f7c9e /src/keymap.c
parent11e8c205e72865df1428821fb4fe9e56cb929262 (diff)
downloademacs-5d55ffd05d2e689f6a2b249d94270c966bac7c72.tar.gz
emacs-5d55ffd05d2e689f6a2b249d94270c966bac7c72.zip
(apropos_predicate, apropos_accumulate): Make them static.
(syms_of_keymap): staticpro them. (Fapropos_internal): Initialize them and clear them out. Don't GCPRO them.
Diffstat (limited to 'src/keymap.c')
-rw-r--r--src/keymap.c17
1 files 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,
3467} 3467}
3468 3468
3469/* Apropos - finding all symbols whose names match a regexp. */ 3469/* Apropos - finding all symbols whose names match a regexp. */
3470Lisp_Object apropos_predicate; 3470static Lisp_Object apropos_predicate;
3471Lisp_Object apropos_accumulate; 3471static Lisp_Object apropos_accumulate;
3472 3472
3473static void 3473static void
3474apropos_accum (symbol, string) 3474apropos_accum (symbol, string)
@@ -3491,15 +3491,16 @@ Return list of symbols found. */)
3491 (regexp, predicate) 3491 (regexp, predicate)
3492 Lisp_Object regexp, predicate; 3492 Lisp_Object regexp, predicate;
3493{ 3493{
3494 Lisp_Object tem;
3494 struct gcpro gcpro1, gcpro2; 3495 struct gcpro gcpro1, gcpro2;
3495 CHECK_STRING (regexp); 3496 CHECK_STRING (regexp);
3496 apropos_predicate = predicate; 3497 apropos_predicate = predicate;
3497 GCPRO2 (apropos_predicate, apropos_accumulate);
3498 apropos_accumulate = Qnil; 3498 apropos_accumulate = Qnil;
3499 map_obarray (Vobarray, apropos_accum, regexp); 3499 map_obarray (Vobarray, apropos_accum, regexp);
3500 apropos_accumulate = Fsort (apropos_accumulate, Qstring_lessp); 3500 tem = Fsort (apropos_accumulate, Qstring_lessp);
3501 UNGCPRO; 3501 apropos_accumulate = Qnil;
3502 return apropos_accumulate; 3502 apropos_predicate = Qnil;
3503 return tem;
3503} 3504}
3504 3505
3505void 3506void
@@ -3507,6 +3508,10 @@ syms_of_keymap ()
3507{ 3508{
3508 Qkeymap = intern ("keymap"); 3509 Qkeymap = intern ("keymap");
3509 staticpro (&Qkeymap); 3510 staticpro (&Qkeymap);
3511 staticpro (&apropos_predicate);
3512 staticpro (&apropos_accumulate);
3513 apropos_predicate = Qnil;
3514 apropos_accumulate = Qnil;
3510 3515
3511 /* Now we are ready to set up this property, so we can 3516 /* Now we are ready to set up this property, so we can
3512 create char tables. */ 3517 create char tables. */