aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman1998-05-14 03:54:50 +0000
committerRichard M. Stallman1998-05-14 03:54:50 +0000
commit6b3a18963aa4c7e398e6702a1e7318b3eaa2c07c (patch)
tree434be337e8b9328ab2ada5b492d5c16a6d1c8517 /src
parenta56d55b7037450e951b18bad87e62db5e9c6ba43 (diff)
downloademacs-6b3a18963aa4c7e398e6702a1e7318b3eaa2c07c.tar.gz
emacs-6b3a18963aa4c7e398e6702a1e7318b3eaa2c07c.zip
(Finsert_file_contents): Don't check non-regular
files for a coding: specification.
Diffstat (limited to 'src')
-rw-r--r--src/fileio.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/fileio.c b/src/fileio.c
index e83548244aa..352129a0853 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -3368,7 +3368,8 @@ This does code conversion according to the value of\n\
3368 3368
3369 /* Decide the coding-system of the file. */ 3369 /* Decide the coding-system of the file. */
3370 { 3370 {
3371 Lisp_Object val = Qnil; 3371 Lisp_Object val;
3372 val = Qnil;
3372 3373
3373 if (!NILP (Vcoding_system_for_read)) 3374 if (!NILP (Vcoding_system_for_read))
3374 val = Vcoding_system_for_read; 3375 val = Vcoding_system_for_read;
@@ -3376,8 +3377,10 @@ This does code conversion according to the value of\n\
3376 /* In REPLACE mode, we can use the same coding system 3377 /* In REPLACE mode, we can use the same coding system
3377 that was used to visit the file. */ 3378 that was used to visit the file. */
3378 val = current_buffer->buffer_file_coding_system; 3379 val = current_buffer->buffer_file_coding_system;
3379 else 3380 else if (! not_regular)
3380 { 3381 {
3382 /* Don't try looking inside a file for a coding system specification
3383 if it is not seekable. */
3381 if (! NILP (Vset_auto_coding_function)) 3384 if (! NILP (Vset_auto_coding_function))
3382 { 3385 {
3383 /* Find a coding system specified in the heading two lines 3386 /* Find a coding system specified in the heading two lines
@@ -3493,10 +3496,11 @@ This does code conversion according to the value of\n\
3493 { 3496 {
3494 Lisp_Object args[6], coding_systems; 3497 Lisp_Object args[6], coding_systems;
3495 3498
3496 args[0] = Qinsert_file_contents, args[1] = orig_filename, 3499 args[0] = Qinsert_file_contents, args[1] = orig_filename;
3497 args[2] = visit, args[3] = beg, args[4] = end, args[5] = replace; 3500 args[2] = visit, args[3] = beg, args[4] = end, args[5] = replace;
3498 coding_systems = Ffind_operation_coding_system (6, args); 3501 coding_systems = Ffind_operation_coding_system (6, args);
3499 if (CONSP (coding_systems)) val = XCONS (coding_systems)->car; 3502 if (CONSP (coding_systems))
3503 val = XCONS (coding_systems)->car;
3500 } 3504 }
3501 } 3505 }
3502 3506