diff 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
line wrap: on
line diff
--- a/src/fileio.c	Sun Sep 01 20:43:10 1996 +0000
+++ b/src/fileio.c	Sun Sep 01 20:44:46 1996 +0000
@@ -3749,6 +3749,9 @@
   Lisp_Object annotations;
   Lisp_Object p, res;
   struct gcpro gcpro1, gcpro2;
+  Lisp_Object original_buffer;
+
+  XSETBUFFER (original_buffer, current_buffer);
 
   annotations = Qnil;
   p = Vwrite_region_annotate_functions;
@@ -3783,7 +3786,8 @@
     {
       struct buffer *given_buffer = current_buffer;
       Vwrite_region_annotations_so_far = annotations;
-      res = call3 (Qformat_annotate_function, Fcar (p), start, end);
+      res = call4 (Qformat_annotate_function, Fcar (p), start, end,
+		   original_buffer);
       if (current_buffer != given_buffer)
 	{
 	  start = BEGV;