changeset 50546:4a06e3332577

(Vafter_insert_file_adjust_coding_function): Delete this variable. (Qafter_insert_file_set_coding): New variable. (syms_of_fileio): Initialize and staticpro it. Delete declaration for after-insert-file-adjust-coding-function. (Finsert_file_contents): Call Qafter_insert_file_set_coding instead of Vafter_insert_file_adjust_coding_function.
author Kenichi Handa <handa@m17n.org>
date Fri, 11 Apr 2003 10:59:02 +0000
parents f1c99baf3a4f
children 589dbff3b754
files src/fileio.c
diffstat 1 files changed, 6 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/src/fileio.c	Fri Apr 11 09:08:29 2003 +0000
+++ b/src/fileio.c	Fri Apr 11 10:59:02 2003 +0000
@@ -177,9 +177,9 @@
 /* Functions to be called to process text properties in inserted file.  */
 Lisp_Object Vafter_insert_file_functions;
 
-/* Function to be called to adjust buffer-file-coding-system and the
+/* Lisp function for setting buffer-file-coding-system and the
    multibyteness of the current buffer after inserting a file.  */
-Lisp_Object Vafter_insert_file_adjust_coding_function;
+Lisp_Object Qafter_insert_file_set_coding;
 
 /* Functions to be called to create text property annotations for file.  */
 Lisp_Object Vwrite_region_annotate_functions;
@@ -4547,10 +4547,9 @@
   if (set_coding_system)
     Vlast_coding_system_used = coding.symbol;
 
-  if (FUNCTIONP (Vafter_insert_file_adjust_coding_function))
+  if (! NILP (Ffboundp (Qafter_insert_file_set_coding)))
     {
-      insval = call1 (Vafter_insert_file_adjust_coding_function,
-		      make_number (inserted));
+      insval = call1 (Qafter_insert_file_set_coding, make_number (inserted));
       if (! NILP (insval))
 	{
 	  CHECK_NUMBER (insval);
@@ -6359,6 +6358,8 @@
   staticpro (&Qformat_decode);
   Qformat_annotate_function = intern ("format-annotate-function");
   staticpro (&Qformat_annotate_function);
+  Qafter_insert_file_set_coding = intern ("after-insert-file-set-coding");
+  staticpro (&Qafter_insert_file_set_coding);
 
   Qcar_less_than_car = intern ("car-less-than-car");
   staticpro (&Qcar_less_than_car);
@@ -6429,14 +6430,6 @@
 or local variable spec of the tailing lines with `coding:' tag.  */);
   Vset_auto_coding_function = Qnil;
 
-  DEFVAR_LISP ("after-insert-file-adjust-coding-function",
-	       &Vafter_insert_file_adjust_coding_function,
-	       doc: /* Function to call to adjust buffer-file-coding-system after inserting a file.
-The function is called with one arguemnt, the number of characters inserted.
-It should adjust `buffer-file-coding-system' and the multibyteness of
-the current buffer, and return the new character count.  */);
-  Vafter_insert_file_adjust_coding_function = Qnil;
-
   DEFVAR_LISP ("after-insert-file-functions", &Vafter_insert_file_functions,
 	       doc: /* A list of functions to be called at the end of `insert-file-contents'.
 Each is passed one argument, the number of characters inserted.