From e43054262b4764a7a6440f0c3cf6a1402d10c77a Mon Sep 17 00:00:00 2001 From: David Kastrup Date: Mon, 25 Jun 2007 19:48:37 +0000 Subject: [PATCH] (Fcall_interactively): Make the parsing of interactive specs somewhat more readable. --- src/ChangeLog | 5 +++++ src/callint.c | 11 +++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 825292054ac..b425016766c 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -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 --git a/src/callint.c b/src/callint.c index a989f9afe6d..887f87630e3 100644 --- a/src/callint.c +++ b/src/callint.c @@ -473,16 +473,19 @@ invoke it. If KEYS is omitted or nil, the return value of /* 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; -- 2.39.2