comparison src/fileio.c @ 16044:63b85944e37b

(build_annotations): Remember original buffer that the region came from; pass this to `format-annotate-function'.
author Richard M. Stallman <rms@gnu.org>
date Sun, 01 Sep 1996 20:44:46 +0000
parents 4ccf88623c95
children ddc7e0142964
comparison
equal deleted inserted replaced
16043:f3a7e1cb07d6 16044:63b85944e37b
3747 Lisp_Object start, end; 3747 Lisp_Object start, end;
3748 { 3748 {
3749 Lisp_Object annotations; 3749 Lisp_Object annotations;
3750 Lisp_Object p, res; 3750 Lisp_Object p, res;
3751 struct gcpro gcpro1, gcpro2; 3751 struct gcpro gcpro1, gcpro2;
3752 Lisp_Object original_buffer;
3753
3754 XSETBUFFER (original_buffer, current_buffer);
3752 3755
3753 annotations = Qnil; 3756 annotations = Qnil;
3754 p = Vwrite_region_annotate_functions; 3757 p = Vwrite_region_annotate_functions;
3755 GCPRO2 (annotations, p); 3758 GCPRO2 (annotations, p);
3756 while (!NILP (p)) 3759 while (!NILP (p))
3781 p = current_buffer->file_format; 3784 p = current_buffer->file_format;
3782 while (!NILP (p)) 3785 while (!NILP (p))
3783 { 3786 {
3784 struct buffer *given_buffer = current_buffer; 3787 struct buffer *given_buffer = current_buffer;
3785 Vwrite_region_annotations_so_far = annotations; 3788 Vwrite_region_annotations_so_far = annotations;
3786 res = call3 (Qformat_annotate_function, Fcar (p), start, end); 3789 res = call4 (Qformat_annotate_function, Fcar (p), start, end,
3790 original_buffer);
3787 if (current_buffer != given_buffer) 3791 if (current_buffer != given_buffer)
3788 { 3792 {
3789 start = BEGV; 3793 start = BEGV;
3790 end = ZV; 3794 end = ZV;
3791 annotations = Qnil; 3795 annotations = Qnil;