diff options
| author | Richard M. Stallman | 1996-09-01 20:44:46 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1996-09-01 20:44:46 +0000 |
| commit | 0a20b6841d0534ff4777d5429b657a58047e139b (patch) | |
| tree | 1770fc3bb0bfb954b383ae5419aca921d2b2a9c6 /src | |
| parent | 75a209d4bc0e1b1a0a2f7400bf7aac5a24fca554 (diff) | |
| download | emacs-0a20b6841d0534ff4777d5429b657a58047e139b.tar.gz emacs-0a20b6841d0534ff4777d5429b657a58047e139b.zip | |
(build_annotations): Remember original buffer that the
region came from; pass this to `format-annotate-function'.
Diffstat (limited to 'src')
| -rw-r--r-- | src/fileio.c | 6 |
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) | |||
| 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; |
| @@ -3783,7 +3786,8 @@ build_annotations (start, end) | |||
| 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; |