diff options
| author | Andreas Schwab | 2011-12-25 10:06:42 +0100 |
|---|---|---|
| committer | Andreas Schwab | 2011-12-25 10:06:42 +0100 |
| commit | ca22b785992df70ddc30ec471484e0204a384277 (patch) | |
| tree | 2bb54b9fc31f31b3e5b431fecfa800241ba3899f /src | |
| parent | be8b11bb321086c7edfdcf4ac079d694e6a8b97b (diff) | |
| download | emacs-ca22b785992df70ddc30ec471484e0204a384277.tar.gz emacs-ca22b785992df70ddc30ec471484e0204a384277.zip | |
* callint.c (Fcall_interactively): Don't truncate prompt string.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 4 | ||||
| -rw-r--r-- | src/callint.c | 11 |
2 files changed, 6 insertions, 9 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 3a0264e394b..a1210e08424 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2011-12-24 Andreas Schwab <schwab@linux-m68k.org> | ||
| 2 | |||
| 3 | * callint.c (Fcall_interactively): Don't truncate prompt string. | ||
| 4 | |||
| 1 | 2011-12-23 Eli Zaretskii <eliz@gnu.org> | 5 | 2011-12-23 Eli Zaretskii <eliz@gnu.org> |
| 2 | 6 | ||
| 3 | * xdisp.c (handle_invisible_prop): Handle correctly an invisible | 7 | * xdisp.c (handle_invisible_prop): Handle correctly an invisible |
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 | |||
| 274 | 274 | ||
| 275 | ptrdiff_t i, nargs; | 275 | ptrdiff_t i, nargs; |
| 276 | int foo; | 276 | int foo; |
| 277 | char prompt1[100]; | ||
| 278 | char *tem1; | ||
| 279 | int arg_from_tty = 0; | 277 | int arg_from_tty = 0; |
| 280 | struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5; | 278 | struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5; |
| 281 | int key_count; | 279 | int key_count; |
| @@ -491,13 +489,8 @@ invoke it. If KEYS is omitted or nil, the return value of | |||
| 491 | tem = string; | 489 | tem = string; |
| 492 | for (i = 1; *tem; i++) | 490 | for (i = 1; *tem; i++) |
| 493 | { | 491 | { |
| 494 | strncpy (prompt1, tem + 1, sizeof prompt1 - 1); | 492 | visargs[0] = make_string (tem + 1, strcspn (tem + 1, "\n")); |
| 495 | prompt1[sizeof prompt1 - 1] = 0; | 493 | if (strchr (SSDATA (visargs[0]), '%')) |
| 496 | tem1 = strchr (prompt1, '\n'); | ||
| 497 | if (tem1) *tem1 = 0; | ||
| 498 | |||
| 499 | visargs[0] = build_string (prompt1); | ||
| 500 | if (strchr (prompt1, '%')) | ||
| 501 | callint_message = Fformat (i, visargs); | 494 | callint_message = Fformat (i, visargs); |
| 502 | else | 495 | else |
| 503 | callint_message = visargs[0]; | 496 | callint_message = visargs[0]; |