Mercurial > hg > xemacs-beta
comparison src/print.c @ 167:85ec50267440 r20-3b10
Import from CVS: tag r20-3b10
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:45:46 +0200 |
parents | 538048ae2ab8 |
children | 929b76928fce |
comparison
equal
deleted
inserted
replaced
166:7a77eb660975 | 167:85ec50267440 |
---|---|
595 #include "emacsfns.h" | 595 #include "emacsfns.h" |
596 /* Synched with Emacs 19.34 */ | 596 /* Synched with Emacs 19.34 */ |
597 DEFUN ("error-message-string", Ferror_message_string, 1, 1, 0, /* | 597 DEFUN ("error-message-string", Ferror_message_string, 1, 1, 0, /* |
598 Convert an error value (ERROR-SYMBOL . DATA) to an error message. | 598 Convert an error value (ERROR-SYMBOL . DATA) to an error message. |
599 */ | 599 */ |
600 (obj)) | 600 (data)) |
601 { | 601 { |
602 struct buffer *old = XBUFFER(Fcurrent_buffer()); | 602 struct buffer *pbuf; |
603 Lisp_Object original, printcharfun, value; | 603 Lisp_Object original, printcharfun, value; |
604 struct gcpro gcpro1; | 604 struct gcpro gcpro1; |
605 | 605 |
606 print_error_message (obj, Vprin1_to_string_buffer); | 606 print_error_message (data, Vprin1_to_string_buffer); |
607 | 607 |
608 set_buffer_internal (XBUFFER (Vprin1_to_string_buffer)); | 608 pbuf = XBUFFER (Vprin1_to_string_buffer); |
609 value = Fbuffer_substring (Fpoint_min(Fcurrent_buffer()), | 609 value = make_string_from_buffer (pbuf, |
610 Fpoint_max(Fcurrent_buffer()), | 610 BUF_BEGV (pbuf), |
611 Fcurrent_buffer()); | 611 BUF_ZV (pbuf) - BUF_BEGV (pbuf)); |
612 | |
613 GCPRO1 (value); | 612 GCPRO1 (value); |
614 Ferase_buffer (Fcurrent_buffer()); | 613 Ferase_buffer (Vprin1_to_string_buffer); |
615 set_buffer_internal (old); | |
616 UNGCPRO; | 614 UNGCPRO; |
617 | 615 |
618 return value; | 616 return value; |
619 } | 617 } |
620 | 618 |