comparison src/minibuf.c @ 7672:c6d09116d66a

(Fminibuffer_complete_word): GCPRO completion and tem.
author Karl Heuer <kwzh@gnu.org>
date Wed, 25 May 1994 02:39:20 +0000
parents cd81dba38a49
children e55490c43ed0
comparison
equal deleted inserted replaced
7671:31d444fcae24 7672:c6d09116d66a
1272 () 1272 ()
1273 { 1273 {
1274 Lisp_Object completion, tem; 1274 Lisp_Object completion, tem;
1275 register int i; 1275 register int i;
1276 register unsigned char *completion_string; 1276 register unsigned char *completion_string;
1277 struct gcpro gcpro1; 1277 struct gcpro gcpro1, gcpro2;
1278 1278
1279 /* We keep calling Fbuffer_string rather than arrange for GC to 1279 /* We keep calling Fbuffer_string rather than arrange for GC to
1280 hold onto a pointer to one of the strings thus made. */ 1280 hold onto a pointer to one of the strings thus made. */
1281 1281
1282 completion = Ftry_completion (Fbuffer_string (), 1282 completion = Ftry_completion (Fbuffer_string (),
1310 { 1310 {
1311 register unsigned char *buffer_string; 1311 register unsigned char *buffer_string;
1312 int buffer_length, completion_length; 1312 int buffer_length, completion_length;
1313 1313
1314 tem = Fbuffer_string (); 1314 tem = Fbuffer_string ();
1315 GCPRO2 (completion, tem);
1315 /* If reading a file name, 1316 /* If reading a file name,
1316 expand any $ENVVAR refs in the buffer and in TEM. */ 1317 expand any $ENVVAR refs in the buffer and in TEM. */
1317 if (EQ (Vminibuffer_completion_table, Qread_file_name_internal)) 1318 if (EQ (Vminibuffer_completion_table, Qread_file_name_internal))
1318 { 1319 {
1319 Lisp_Object substituted; 1320 Lisp_Object substituted;
1341 while (0 <= scmp (buffer_string++, completion_string, buffer_length--)) 1342 while (0 <= scmp (buffer_string++, completion_string, buffer_length--))
1342 i++; 1343 i++;
1343 del_range (1, i + 1); 1344 del_range (1, i + 1);
1344 SET_PT (ZV); 1345 SET_PT (ZV);
1345 } 1346 }
1347 UNGCPRO;
1346 } 1348 }
1347 #endif /* Rewritten code */ 1349 #endif /* Rewritten code */
1348 i = ZV - BEGV; 1350 i = ZV - BEGV;
1349 1351
1350 /* If completion finds next char not unique, 1352 /* If completion finds next char not unique,