3532 |
immediate_quit = 1; |
immediate_quit = 1; |
3533 |
QUIT; |
QUIT; |
3534 |
nbytes = emacs_read (non_regular_fd, |
nbytes = emacs_read (non_regular_fd, |
3535 |
BEG_ADDR + PT_BYTE - 1 + non_regular_inserted, |
BEG_ADDR + PT_BYTE - BEG_BYTE + non_regular_inserted, |
3536 |
non_regular_nbytes); |
non_regular_nbytes); |
3537 |
immediate_quit = 0; |
immediate_quit = 0; |
3538 |
return make_number (nbytes); |
return make_number (nbytes); |
4321 |
here doesn't do any harm. */ |
here doesn't do any harm. */ |
4322 |
immediate_quit = 1; |
immediate_quit = 1; |
4323 |
QUIT; |
QUIT; |
4324 |
this = emacs_read (fd, BEG_ADDR + PT_BYTE - 1 + inserted, trytry); |
this = emacs_read (fd, BEG_ADDR + PT_BYTE - BEG_BYTE + inserted, trytry); |
4325 |
immediate_quit = 0; |
immediate_quit = 0; |
4326 |
} |
} |
4327 |
|
|
4550 |
} |
} |
4551 |
|
|
4552 |
p = Vafter_insert_file_functions; |
p = Vafter_insert_file_functions; |
4553 |
while (!NILP (p)) |
while (CONSP (p)) |
4554 |
{ |
{ |
4555 |
insval = call1 (Fcar (p), make_number (inserted)); |
insval = call1 (XCAR (p), make_number (inserted)); |
4556 |
if (!NILP (insval)) |
if (!NILP (insval)) |
4557 |
{ |
{ |
4558 |
CHECK_NUMBER (insval); |
CHECK_NUMBER (insval); |
4559 |
inserted = XFASTINT (insval); |
inserted = XFASTINT (insval); |
4560 |
} |
} |
4561 |
QUIT; |
QUIT; |
4562 |
p = Fcdr (p); |
p = XCDR (p); |
4563 |
} |
} |
4564 |
|
|
4565 |
if (!NILP (visit) |
if (!NILP (visit) |
5166 |
annotations = Qnil; |
annotations = Qnil; |
5167 |
p = Vwrite_region_annotate_functions; |
p = Vwrite_region_annotate_functions; |
5168 |
GCPRO2 (annotations, p); |
GCPRO2 (annotations, p); |
5169 |
while (!NILP (p)) |
while (CONSP (p)) |
5170 |
{ |
{ |
5171 |
struct buffer *given_buffer = current_buffer; |
struct buffer *given_buffer = current_buffer; |
5172 |
Vwrite_region_annotations_so_far = annotations; |
Vwrite_region_annotations_so_far = annotations; |
5173 |
res = call2 (Fcar (p), start, end); |
res = call2 (XCAR (p), start, end); |
5174 |
/* If the function makes a different buffer current, |
/* If the function makes a different buffer current, |
5175 |
assume that means this buffer contains altered text to be output. |
assume that means this buffer contains altered text to be output. |
5176 |
Reset START and END from the buffer bounds |
Reset START and END from the buffer bounds |
5184 |
} |
} |
5185 |
Flength (res); /* Check basic validity of return value */ |
Flength (res); /* Check basic validity of return value */ |
5186 |
annotations = merge (annotations, res, Qcar_less_than_car); |
annotations = merge (annotations, res, Qcar_less_than_car); |
5187 |
p = Fcdr (p); |
p = XCDR (p); |
5188 |
} |
} |
5189 |
|
|
5190 |
/* Now do the same for annotation functions implied by the file-format */ |
/* Now do the same for annotation functions implied by the file-format */ |
5192 |
p = Vauto_save_file_format; |
p = Vauto_save_file_format; |
5193 |
else |
else |
5194 |
p = current_buffer->file_format; |
p = current_buffer->file_format; |
5195 |
for (i = 0; !NILP (p); p = Fcdr (p), ++i) |
for (i = 0; CONSP (p); p = XCDR (p), ++i) |
5196 |
{ |
{ |
5197 |
struct buffer *given_buffer = current_buffer; |
struct buffer *given_buffer = current_buffer; |
5198 |
|
|
5201 |
/* Value is either a list of annotations or nil if the function |
/* Value is either a list of annotations or nil if the function |
5202 |
has written annotations to a temporary buffer, which is now |
has written annotations to a temporary buffer, which is now |
5203 |
current. */ |
current. */ |
5204 |
res = call5 (Qformat_annotate_function, Fcar (p), start, end, |
res = call5 (Qformat_annotate_function, XCAR (p), start, end, |
5205 |
original_buffer, make_number (i)); |
original_buffer, make_number (i)); |
5206 |
if (current_buffer != given_buffer) |
if (current_buffer != given_buffer) |
5207 |
{ |
{ |
6287 |
inserted at the specified positions of the file being written (1 means to |
inserted at the specified positions of the file being written (1 means to |
6288 |
insert before the first byte written). The POSITIONs must be sorted into |
insert before the first byte written). The POSITIONs must be sorted into |
6289 |
increasing order. If there are several functions in the list, the several |
increasing order. If there are several functions in the list, the several |
6290 |
lists are merged destructively. */); |
lists are merged destructively. Alternatively, the function can return |
6291 |
|
with a different buffer current and value nil.*/); |
6292 |
Vwrite_region_annotate_functions = Qnil; |
Vwrite_region_annotate_functions = Qnil; |
6293 |
|
|
6294 |
DEFVAR_LISP ("write-region-annotations-so-far", |
DEFVAR_LISP ("write-region-annotations-so-far", |