# HG changeset patch # User David Kastrup # Date 1182800917 0 # Node ID 75c51005f057bcee9fdc492d637f3b7b3077b860 # Parent 56b815dd1abbe6ec8723a69b3ec4a82d3a591c74 (Fcall_interactively): Make the parsing of interactive specs somewhat more readable. diff -r 56b815dd1abb -r 75c51005f057 src/ChangeLog --- a/src/ChangeLog Mon Jun 25 16:19:05 2007 +0000 +++ b/src/ChangeLog Mon Jun 25 19:48:37 2007 +0000 @@ -1,3 +1,8 @@ +2007-06-25 David Kastrup + + * callint.c (Fcall_interactively): Make the parsing of interactive + specs somewhat more readable. + 2007-06-23 YAMAMOTO Mitsuharu * macterm.c (x_draw_fringe_bitmap) [MAC_OSX]: Extend fringe background diff -r 56b815dd1abb -r 75c51005f057 src/callint.c --- a/src/callint.c Mon Jun 25 16:19:05 2007 +0000 +++ b/src/callint.c Mon Jun 25 19:48:37 2007 +0000 @@ -473,16 +473,19 @@ /* Count the number of arguments the interactive spec would have us give to the function. */ tem = string; - for (j = 0; *tem; j++) + for (j = 0; *tem;) { /* 'r' specifications ("point and mark as 2 numeric args") produce *two* arguments. */ - if (*tem == 'r') j++; + if (*tem == 'r') + j += 2; + else + j++; tem = (unsigned char *) index (tem, '\n'); if (tem) - tem++; + ++tem; else - tem = (unsigned char *) ""; + break; } count = j;