changeset 30579:13339fe0bdc0

(Fcall_process): Handle post-read-conversion of coding system if any.
author Kenichi Handa <handa@m17n.org>
date Fri, 04 Aug 2000 02:12:39 +0000
parents 705b94e152b1
children 5d92193ed196
files src/callproc.c
diffstat 1 files changed, 9 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/callproc.c	Fri Aug 04 02:05:39 2000 +0000
+++ b/src/callproc.c	Fri Aug 04 02:12:39 2000 +0000
@@ -727,6 +727,8 @@
     int carryover = 0;
     int display_on_the_fly = !NILP (display) && INTERACTIVE;
     struct coding_system saved_coding;
+    int pt_orig = PT, pt_byte_orig = PT_BYTE;
+    int inserted;
 
     saved_coding = process_coding;
     if (process_coding.composing != COMPOSITION_DISABLED)
@@ -844,6 +846,13 @@
 	coding_free_composition_data (&process_coding);
       }
 
+    record_unwind_protect (save_excursion_restore, save_excursion_save ());
+    inserted = PT - pt_orig;
+    TEMP_SET_PT_BOTH (pt_orig, pt_byte_orig);
+    if (SYMBOLP (process_coding.post_read_conversion)
+	&& !NILP (Ffboundp (process_coding.post_read_conversion)))
+      call1 (process_coding.post_read_conversion, make_number (inserted));
+
     Vlast_coding_system_used = process_coding.symbol;
 
     /* If the caller required, let the buffer inherit the