diff options
author | Andreas Schwab <schwab@linux-m68k.org> | 2011-12-25 10:06:42 +0100 |
---|---|---|
committer | Andreas Schwab <schwab@linux-m68k.org> | 2011-12-25 10:06:42 +0100 |
commit | ca22b785992df70ddc30ec471484e0204a384277 (patch) | |
tree | 2bb54b9fc31f31b3e5b431fecfa800241ba3899f /src/callint.c | |
parent | be8b11bb321086c7edfdcf4ac079d694e6a8b97b (diff) | |
download | emacs-ca22b785992df70ddc30ec471484e0204a384277.tar.gz |
* callint.c (Fcall_interactively): Don't truncate prompt string.
Diffstat (limited to 'src/callint.c')
-rw-r--r-- | src/callint.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/callint.c b/src/callint.c index 80e24f6c8ee..25a4713e270 100644 --- a/src/callint.c +++ b/src/callint.c @@ -274,8 +274,6 @@ invoke it. If KEYS is omitted or nil, the return value of ptrdiff_t i, nargs; int foo; - char prompt1[100]; - char *tem1; int arg_from_tty = 0; struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5; int key_count; @@ -491,13 +489,8 @@ invoke it. If KEYS is omitted or nil, the return value of tem = string; for (i = 1; *tem; i++) { - strncpy (prompt1, tem + 1, sizeof prompt1 - 1); - prompt1[sizeof prompt1 - 1] = 0; - tem1 = strchr (prompt1, '\n'); - if (tem1) *tem1 = 0; - - visargs[0] = build_string (prompt1); - if (strchr (prompt1, '%')) + visargs[0] = make_string (tem + 1, strcspn (tem + 1, "\n")); + if (strchr (SSDATA (visargs[0]), '%')) callint_message = Fformat (i, visargs); else callint_message = visargs[0]; |