aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKim F. Storm2005-09-12 13:42:49 +0000
committerKim F. Storm2005-09-12 13:42:49 +0000
commitdfc22242b5b96d0344fdadb23e723e2f637af40f (patch)
treedef0986258491bcc447a7465fe4afe631cc48bbe /src
parent11fb15d5c492cdfcde124fcbb01e22c3467f3e93 (diff)
downloademacs-dfc22242b5b96d0344fdadb23e723e2f637af40f.tar.gz
emacs-dfc22242b5b96d0344fdadb23e723e2f637af40f.zip
(auto_save_error): Pass copy of lisp string to message2.
Diffstat (limited to 'src')
-rw-r--r--src/fileio.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/fileio.c b/src/fileio.c
index 53ae967e285..a51371be0e6 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -5769,6 +5769,8 @@ auto_save_error (error)
5769 Lisp_Object args[3], msg; 5769 Lisp_Object args[3], msg;
5770 int i, nbytes; 5770 int i, nbytes;
5771 struct gcpro gcpro1; 5771 struct gcpro gcpro1;
5772 char *msgbuf;
5773 USE_SAFE_ALLOCA;
5772 5774
5773 ring_bell (); 5775 ring_bell ();
5774 5776
@@ -5778,13 +5780,15 @@ auto_save_error (error)
5778 msg = Fformat (3, args); 5780 msg = Fformat (3, args);
5779 GCPRO1 (msg); 5781 GCPRO1 (msg);
5780 nbytes = SBYTES (msg); 5782 nbytes = SBYTES (msg);
5783 SAFE_ALLOCA (msgbuf, char *, nbytes);
5784 bcopy (SDATA (msg), msgbuf, nbytes);
5781 5785
5782 for (i = 0; i < 3; ++i) 5786 for (i = 0; i < 3; ++i)
5783 { 5787 {
5784 if (i == 0) 5788 if (i == 0)
5785 message2 (SDATA (msg), nbytes, STRING_MULTIBYTE (msg)); 5789 message2 (msgbuf, nbytes, STRING_MULTIBYTE (msg));
5786 else 5790 else
5787 message2_nolog (SDATA (msg), nbytes, STRING_MULTIBYTE (msg)); 5791 message2_nolog (msgbuf, nbytes, STRING_MULTIBYTE (msg));
5788 Fsleep_for (make_number (1), Qnil); 5792 Fsleep_for (make_number (1), Qnil);
5789 } 5793 }
5790 5794