aboutsummaryrefslogtreecommitdiffstats
path: root/src/callint.c
diff options
context:
space:
mode:
authorPaul Eggert2012-01-09 09:36:10 -0800
committerPaul Eggert2012-01-09 09:36:10 -0800
commit35cf62d95cdcd5323dcea4a5385942c342ff1d9c (patch)
tree90358cbb033a126c4d48793a80fd804b7baaca24 /src/callint.c
parent59815c02506eb39b61e672528ed03885749ba529 (diff)
parent7655cb66d86564e792b825f1a0e1a4de7d6e6db5 (diff)
downloademacs-35cf62d95cdcd5323dcea4a5385942c342ff1d9c.tar.gz
emacs-35cf62d95cdcd5323dcea4a5385942c342ff1d9c.zip
Merge from trunk.
Diffstat (limited to 'src/callint.c')
-rw-r--r--src/callint.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/src/callint.c b/src/callint.c
index 444892ef9cb..78daa8f8fce 100644
--- a/src/callint.c
+++ b/src/callint.c
@@ -1,5 +1,5 @@
1/* Call a Lisp function interactively. 1/* Call a Lisp function interactively.
2 Copyright (C) 1985-1986, 1993-1995, 1997, 2000-2011 2 Copyright (C) 1985-1986, 1993-1995, 1997, 2000-2012
3 Free Software Foundation, Inc. 3 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
@@ -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 ptrdiff_t key_count; 279 ptrdiff_t 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];