summaryrefslogtreecommitdiff
path: root/src/fileio.c
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1996-09-01 20:44:46 +0000
committerRichard M. Stallman <rms@gnu.org>1996-09-01 20:44:46 +0000
commitdf3756b6cad325c87ffdf55aed885e5db258ebc9 (patch)
tree545adc02efdacca77c6b707db22bfd2a04935247 /src/fileio.c
parent65b3f9560c1161f74f5311befb56fd7ddf983956 (diff)
downloademacs-df3756b6cad325c87ffdf55aed885e5db258ebc9.tar.gz
(build_annotations): Remember original buffer that the
region came from; pass this to `format-annotate-function'.
Diffstat (limited to 'src/fileio.c')
-rw-r--r--src/fileio.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/fileio.c b/src/fileio.c
index a9d2b95e09a..88fac439231 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -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;