Mercurial > emacs
diff src/callint.c @ 81608:75c51005f057
(Fcall_interactively): Make the parsing of interactive
specs somewhat more readable.
author | David Kastrup <dak@gnu.org> |
---|---|
date | Mon, 25 Jun 2007 19:48:37 +0000 |
parents | d82619d66bd3 |
children | b98604865ea0 0ece58f6e0aa 988f1edc9674 |
line wrap: on
line diff
--- 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;