]> git.eshelyaron.com Git - emacs.git/commitdiff
(build_annotations): Remember original buffer that the
authorRichard M. Stallman <rms@gnu.org>
Sun, 1 Sep 1996 20:44:46 +0000 (20:44 +0000)
committerRichard M. Stallman <rms@gnu.org>
Sun, 1 Sep 1996 20:44:46 +0000 (20:44 +0000)
region came from; pass this to `format-annotate-function'.

src/fileio.c

index a9d2b95e09ad8eda8c66049666f9292c7227613d..88fac43923118c7dc97a647930382204aeacfad4 100644 (file)
@@ -3749,6 +3749,9 @@ build_annotations (start, end)
   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 @@ build_annotations (start, end)
     {
       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;