Commit 62137a95 authored by Paul Eggert's avatar Paul Eggert
Browse files

* minibuf.c (Ftry_completion, Fall_completions): Rename or remove locals

to avoid shadowing.
parent 5716756e
2011-03-15 Paul Eggert <eggert@cs.ucla.edu> 2011-03-15 Paul Eggert <eggert@cs.ucla.edu>
   
* minibuf.c (choose_minibuf_frame_1): Now static. * minibuf.c (choose_minibuf_frame_1): Now static.
(Ftry_completion, Fall_completions): Rename or remove locals
to avoid shadowing.
   
* marker.c (bytepos_to_charpos): Remove; unused. * marker.c (bytepos_to_charpos): Remove; unused.
   
...@@ -1212,7 +1212,7 @@ is used to further constrain the set of candidates. */) ...@@ -1212,7 +1212,7 @@ is used to further constrain the set of candidates. */)
&& (!SYMBOLP (XCAR (collection)) && (!SYMBOLP (XCAR (collection))
|| NILP (XCAR (collection))))) || NILP (XCAR (collection)))))
? list_table : function_table)); ? list_table : function_table));
int index = 0, obsize = 0; int idx = 0, obsize = 0;
int matchcount = 0; int matchcount = 0;
int bindcount = -1; int bindcount = -1;
Lisp_Object bucket, zero, end, tem; Lisp_Object bucket, zero, end, tem;
...@@ -1231,7 +1231,7 @@ is used to further constrain the set of candidates. */) ...@@ -1231,7 +1231,7 @@ is used to further constrain the set of candidates. */)
{ {
collection = check_obarray (collection); collection = check_obarray (collection);
obsize = XVECTOR (collection)->size; obsize = XVECTOR (collection)->size;
bucket = XVECTOR (collection)->contents[index]; bucket = XVECTOR (collection)->contents[idx];
} }
while (1) while (1)
...@@ -1262,23 +1262,23 @@ is used to further constrain the set of candidates. */) ...@@ -1262,23 +1262,23 @@ is used to further constrain the set of candidates. */)
else else
XSETFASTINT (bucket, 0); XSETFASTINT (bucket, 0);
} }
else if (++index >= obsize) else if (++idx >= obsize)
break; break;
else else
{ {
bucket = XVECTOR (collection)->contents[index]; bucket = XVECTOR (collection)->contents[idx];
continue; continue;
} }
} }
else /* if (type == hash_table) */ else /* if (type == hash_table) */
{ {
while (index < HASH_TABLE_SIZE (XHASH_TABLE (collection)) while (idx < HASH_TABLE_SIZE (XHASH_TABLE (collection))
&& NILP (HASH_HASH (XHASH_TABLE (collection), index))) && NILP (HASH_HASH (XHASH_TABLE (collection), idx)))
index++; idx++;
if (index >= HASH_TABLE_SIZE (XHASH_TABLE (collection))) if (idx >= HASH_TABLE_SIZE (XHASH_TABLE (collection)))
break; break;
else else
elt = eltstring = HASH_KEY (XHASH_TABLE (collection), index++); elt = eltstring = HASH_KEY (XHASH_TABLE (collection), idx++);
} }
/* Is this element a possible completion? */ /* Is this element a possible completion? */
...@@ -1333,7 +1333,7 @@ is used to further constrain the set of candidates. */) ...@@ -1333,7 +1333,7 @@ is used to further constrain the set of candidates. */)
tem = (type == hash_table tem = (type == hash_table
? call2 (predicate, elt, ? call2 (predicate, elt,
HASH_VALUE (XHASH_TABLE (collection), HASH_VALUE (XHASH_TABLE (collection),
index - 1)) idx - 1))
: call1 (predicate, elt)); : call1 (predicate, elt));
UNGCPRO; UNGCPRO;
} }
...@@ -1477,7 +1477,7 @@ with a space are ignored unless STRING itself starts with a space. */) ...@@ -1477,7 +1477,7 @@ with a space are ignored unless STRING itself starts with a space. */)
: NILP (collection) || (CONSP (collection) : NILP (collection) || (CONSP (collection)
&& (!SYMBOLP (XCAR (collection)) && (!SYMBOLP (XCAR (collection))
|| NILP (XCAR (collection)))); || NILP (XCAR (collection))));
int index = 0, obsize = 0; int idx = 0, obsize = 0;
int bindcount = -1; int bindcount = -1;
Lisp_Object bucket, tem, zero; Lisp_Object bucket, tem, zero;
struct gcpro gcpro1, gcpro2, gcpro3, gcpro4; struct gcpro gcpro1, gcpro2, gcpro3, gcpro4;
...@@ -1494,7 +1494,7 @@ with a space are ignored unless STRING itself starts with a space. */) ...@@ -1494,7 +1494,7 @@ with a space are ignored unless STRING itself starts with a space. */)
{ {
collection = check_obarray (collection); collection = check_obarray (collection);
obsize = XVECTOR (collection)->size; obsize = XVECTOR (collection)->size;
bucket = XVECTOR (collection)->contents[index]; bucket = XVECTOR (collection)->contents[idx];
} }
while (1) while (1)
...@@ -1525,23 +1525,23 @@ with a space are ignored unless STRING itself starts with a space. */) ...@@ -1525,23 +1525,23 @@ with a space are ignored unless STRING itself starts with a space. */)
else else
XSETFASTINT (bucket, 0); XSETFASTINT (bucket, 0);
} }
else if (++index >= obsize) else if (++idx >= obsize)
break; break;
else else
{ {
bucket = XVECTOR (collection)->contents[index]; bucket = XVECTOR (collection)->contents[idx];
continue; continue;
} }
} }
else /* if (type == 3) */ else /* if (type == 3) */
{ {
while (index < HASH_TABLE_SIZE (XHASH_TABLE (collection)) while (idx < HASH_TABLE_SIZE (XHASH_TABLE (collection))
&& NILP (HASH_HASH (XHASH_TABLE (collection), index))) && NILP (HASH_HASH (XHASH_TABLE (collection), idx)))
index++; idx++;
if (index >= HASH_TABLE_SIZE (XHASH_TABLE (collection))) if (idx >= HASH_TABLE_SIZE (XHASH_TABLE (collection)))
break; break;
else else
elt = eltstring = HASH_KEY (XHASH_TABLE (collection), index++); elt = eltstring = HASH_KEY (XHASH_TABLE (collection), idx++);
} }
/* Is this element a possible completion? */ /* Is this element a possible completion? */
...@@ -1566,8 +1566,6 @@ with a space are ignored unless STRING itself starts with a space. */) ...@@ -1566,8 +1566,6 @@ with a space are ignored unless STRING itself starts with a space. */)
{ {
/* Yes. */ /* Yes. */
Lisp_Object regexps; Lisp_Object regexps;
Lisp_Object zero;
XSETFASTINT (zero, 0);
/* Ignore this element if it fails to match all the regexps. */ /* Ignore this element if it fails to match all the regexps. */
{ {
...@@ -1603,7 +1601,7 @@ with a space are ignored unless STRING itself starts with a space. */) ...@@ -1603,7 +1601,7 @@ with a space are ignored unless STRING itself starts with a space. */)
GCPRO4 (tail, eltstring, allmatches, string); GCPRO4 (tail, eltstring, allmatches, string);
tem = type == 3 tem = type == 3
? call2 (predicate, elt, ? call2 (predicate, elt,
HASH_VALUE (XHASH_TABLE (collection), index - 1)) HASH_VALUE (XHASH_TABLE (collection), idx - 1))
: call1 (predicate, elt); : call1 (predicate, elt);
UNGCPRO; UNGCPRO;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment