aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenichi Handa2003-04-11 10:59:02 +0000
committerKenichi Handa2003-04-11 10:59:02 +0000
commit2080470e7159d86b8e50985921512e20518bdacf (patch)
treec054a6db47963554a13fb1ddcd3eaee6a3779bdf /src
parent36278af32a69bfc341b0b3e2ba1bef9c34152ecf (diff)
downloademacs-2080470e7159d86b8e50985921512e20518bdacf.tar.gz
emacs-2080470e7159d86b8e50985921512e20518bdacf.zip
(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.
Diffstat (limited to 'src')
-rw-r--r--src/fileio.c19
1 files changed, 6 insertions, 13 deletions
diff --git a/src/fileio.c b/src/fileio.c
index e717e1281fe..29367875ac4 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -177,9 +177,9 @@ Lisp_Object Vset_auto_coding_function;
177/* Functions to be called to process text properties in inserted file. */ 177/* Functions to be called to process text properties in inserted file. */
178Lisp_Object Vafter_insert_file_functions; 178Lisp_Object Vafter_insert_file_functions;
179 179
180/* Function to be called to adjust buffer-file-coding-system and the 180/* Lisp function for setting buffer-file-coding-system and the
181 multibyteness of the current buffer after inserting a file. */ 181 multibyteness of the current buffer after inserting a file. */
182Lisp_Object Vafter_insert_file_adjust_coding_function; 182Lisp_Object Qafter_insert_file_set_coding;
183 183
184/* Functions to be called to create text property annotations for file. */ 184/* Functions to be called to create text property annotations for file. */
185Lisp_Object Vwrite_region_annotate_functions; 185Lisp_Object Vwrite_region_annotate_functions;
@@ -4547,10 +4547,9 @@ actually used. */)
4547 if (set_coding_system) 4547 if (set_coding_system)
4548 Vlast_coding_system_used = coding.symbol; 4548 Vlast_coding_system_used = coding.symbol;
4549 4549
4550 if (FUNCTIONP (Vafter_insert_file_adjust_coding_function)) 4550 if (! NILP (Ffboundp (Qafter_insert_file_set_coding)))
4551 { 4551 {
4552 insval = call1 (Vafter_insert_file_adjust_coding_function, 4552 insval = call1 (Qafter_insert_file_set_coding, make_number (inserted));
4553 make_number (inserted));
4554 if (! NILP (insval)) 4553 if (! NILP (insval))
4555 { 4554 {
4556 CHECK_NUMBER (insval); 4555 CHECK_NUMBER (insval);
@@ -6359,6 +6358,8 @@ same format as a regular save would use. */);
6359 staticpro (&Qformat_decode); 6358 staticpro (&Qformat_decode);
6360 Qformat_annotate_function = intern ("format-annotate-function"); 6359 Qformat_annotate_function = intern ("format-annotate-function");
6361 staticpro (&Qformat_annotate_function); 6360 staticpro (&Qformat_annotate_function);
6361 Qafter_insert_file_set_coding = intern ("after-insert-file-set-coding");
6362 staticpro (&Qafter_insert_file_set_coding);
6362 6363
6363 Qcar_less_than_car = intern ("car-less-than-car"); 6364 Qcar_less_than_car = intern ("car-less-than-car");
6364 staticpro (&Qcar_less_than_car); 6365 staticpro (&Qcar_less_than_car);
@@ -6429,14 +6430,6 @@ specified in the heading lines with the format:
6429or local variable spec of the tailing lines with `coding:' tag. */); 6430or local variable spec of the tailing lines with `coding:' tag. */);
6430 Vset_auto_coding_function = Qnil; 6431 Vset_auto_coding_function = Qnil;
6431 6432
6432 DEFVAR_LISP ("after-insert-file-adjust-coding-function",
6433 &Vafter_insert_file_adjust_coding_function,
6434 doc: /* Function to call to adjust buffer-file-coding-system after inserting a file.
6435The function is called with one arguemnt, the number of characters inserted.
6436It should adjust `buffer-file-coding-system' and the multibyteness of
6437the current buffer, and return the new character count. */);
6438 Vafter_insert_file_adjust_coding_function = Qnil;
6439
6440 DEFVAR_LISP ("after-insert-file-functions", &Vafter_insert_file_functions, 6433 DEFVAR_LISP ("after-insert-file-functions", &Vafter_insert_file_functions,
6441 doc: /* A list of functions to be called at the end of `insert-file-contents'. 6434 doc: /* A list of functions to be called at the end of `insert-file-contents'.
6442Each is passed one argument, the number of characters inserted. 6435Each is passed one argument, the number of characters inserted.