From: Richard M. Stallman Date: Sat, 7 Oct 1995 22:00:06 +0000 (+0000) Subject: (describe_vector): Use Flength to get length of vector. X-Git-Tag: emacs-19.34~2715 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b5585f5c189bc0779936a673281025025103ee12;p=emacs.git (describe_vector): Use Flength to get length of vector. --- diff --git a/src/keymap.c b/src/keymap.c index fd98df15d2b..b7cb8486056 100644 --- a/src/keymap.c +++ b/src/keymap.c @@ -2295,6 +2295,7 @@ describe_vector (vector, elt_prefix, elt_describer, Lisp_Object suppress; Lisp_Object kludge; int first = 1; + int size; struct gcpro gcpro1, gcpro2, gcpro3; definition = Qnil; @@ -2308,7 +2309,10 @@ describe_vector (vector, elt_prefix, elt_describer, if (partial) suppress = intern ("suppress-keymap"); - for (i = 0; i < XVECTOR (vector)->size; i++) + /* This does the right thing for char-tables as well as ordinary vectors. */ + size = XFASTINT (Flength (vector)); + + for (i = 0; i < size; i++) { QUIT; definition = get_keyelt (XVECTOR (vector)->contents[i], 0);