comparison src/print.c @ 56:c0965ff3b039 r19-16-pre3

Import from CVS: tag r19-16-pre3
author cvs
date Mon, 13 Aug 2007 08:58:20 +0200
parents e04119814345
children 131b0175ea99
comparison
equal deleted inserted replaced
55:9e8623109fad 56:c0965ff3b039
589 UNGCPRO; 589 UNGCPRO;
590 return obj; 590 return obj;
591 } 591 }
592 592
593 # include "emacsfns.h" 593 # include "emacsfns.h"
594 static void print_error_message (Lisp_Object data, Lisp_Object stream);
594 /* Synched with Emacs 19.34 */ 595 /* Synched with Emacs 19.34 */
595 DEFUN ("error-message-string", Ferror_message_string, 1, 1, 0, /* 596 DEFUN ("error-message-string", Ferror_message_string, 1, 1, 0, /*
596 Convert an error value (ERROR-SYMBOL . DATA) to an error message. 597 Convert an error value (ERROR-SYMBOL . DATA) to an error message.
597 */ 598 */
598 (obj)) 599 (obj))
599 { 600 {
600 struct buffer *old = XBUFFER(Fcurrent_buffer()); 601 struct buffer *old = XBUFFER(Fcurrent_buffer());
601 Lisp_Object original, printcharfun, value; 602 Lisp_Object original, printcharfun, value;
602 struct gcpro gcpro1; 603 struct gcpro gcpro1;
603 604
604 print_error_message (obj, Vprin1_to_string_buffer, NULL); 605 print_error_message (obj, Vprin1_to_string_buffer);
605 606
606 set_buffer_internal (XBUFFER (Vprin1_to_string_buffer)); 607 set_buffer_internal (XBUFFER (Vprin1_to_string_buffer));
607 value = Fbuffer_substring (Fpoint_min(Fcurrent_buffer()), 608 value = Fbuffer_substring (Fpoint_min(Fcurrent_buffer()),
608 Fpoint_max(Fcurrent_buffer()), 609 Fpoint_max(Fcurrent_buffer()),
609 Fcurrent_buffer()); 610 Fcurrent_buffer());
617 } 618 }
618 619
619 /* Print an error message for the error DATA 620 /* Print an error message for the error DATA
620 onto Lisp output stream STREAM (suitable for the print functions). */ 621 onto Lisp output stream STREAM (suitable for the print functions). */
621 622
622 print_error_message (data, stream) 623 static void
623 Lisp_Object data, stream; 624 print_error_message (Lisp_Object data, Lisp_Object stream)
624 { 625 {
625 Lisp_Object errname, errmsg, file_error, tail; 626 Lisp_Object errname, errmsg, file_error, tail;
626 struct gcpro gcpro1; 627 struct gcpro gcpro1;
627 int i; 628 int i;
628 629