Mercurial > emacs
comparison src/print.c @ 15270:22867e90511f
(Fprin1_to_string): Preserve Vdeactivate_mark.
author | Karl Heuer <kwzh@gnu.org> |
---|---|
date | Tue, 21 May 1996 17:24:24 +0000 |
parents | ee40177f6c68 |
children | e47df82909ff |
comparison
equal
deleted
inserted
replaced
15269:b6381b3a6c99 | 15270:22867e90511f |
---|---|
525 { | 525 { |
526 struct buffer *old = current_buffer; | 526 struct buffer *old = current_buffer; |
527 int old_point = -1; | 527 int old_point = -1; |
528 int start_point; | 528 int start_point; |
529 Lisp_Object original, printcharfun; | 529 Lisp_Object original, printcharfun; |
530 struct gcpro gcpro1; | 530 struct gcpro gcpro1, gcpro2; |
531 Lisp_Object tem; | |
532 | |
533 /* Save and restore this--we are altering a buffer | |
534 but we don't want to deactivate the mark just for that. | |
535 No need for specbind, since errors deactivate the mark. */ | |
536 tem = Vdeactivate_mark; | |
537 GCPRO2 (object, tem); | |
531 | 538 |
532 printcharfun = Vprin1_to_string_buffer; | 539 printcharfun = Vprin1_to_string_buffer; |
533 PRINTPREPARE; | 540 PRINTPREPARE; |
534 print_depth = 0; | 541 print_depth = 0; |
535 print (object, printcharfun, NILP (noescape)); | 542 print (object, printcharfun, NILP (noescape)); |
536 /* Make Vprin1_to_string_buffer be the default buffer after PRINTFINSH */ | 543 /* Make Vprin1_to_string_buffer be the default buffer after PRINTFINSH */ |
537 PRINTFINISH; | 544 PRINTFINISH; |
538 set_buffer_internal (XBUFFER (Vprin1_to_string_buffer)); | 545 set_buffer_internal (XBUFFER (Vprin1_to_string_buffer)); |
539 object = Fbuffer_string (); | 546 object = Fbuffer_string (); |
540 | 547 |
541 GCPRO1 (object); | |
542 Ferase_buffer (); | 548 Ferase_buffer (); |
543 set_buffer_internal (old); | 549 set_buffer_internal (old); |
550 | |
551 Vdeactivate_mark = tem; | |
544 UNGCPRO; | 552 UNGCPRO; |
545 | 553 |
546 return object; | 554 return object; |
547 } | 555 } |
548 | 556 |