Mercurial > vim
comparison src/fileio.c @ 681:9364d114ed8d v7.0204
updated for version 7.0204
author | vimboss |
---|---|
date | Wed, 22 Feb 2006 21:25:37 +0000 |
parents | e629de7618da |
children | 07d199fe02ed |
comparison
equal
deleted
inserted
replaced
680:5b101ff9d4c4 | 681:9364d114ed8d |
---|---|
581 if (eap != NULL && eap->force_enc != 0) | 581 if (eap != NULL && eap->force_enc != 0) |
582 { | 582 { |
583 /* set forced 'fileencoding' */ | 583 /* set forced 'fileencoding' */ |
584 fenc = enc_canonize(eap->cmd + eap->force_enc); | 584 fenc = enc_canonize(eap->cmd + eap->force_enc); |
585 if (fenc != NULL) | 585 if (fenc != NULL) |
586 { | |
586 set_string_option_direct((char_u *)"fenc", -1, | 587 set_string_option_direct((char_u *)"fenc", -1, |
587 fenc, OPT_FREE|OPT_LOCAL); | 588 fenc, OPT_FREE|OPT_LOCAL); |
589 # ifdef FEAT_EVAL | |
590 set_option_scriptID((char_u *)"fenc", current_SID); | |
591 # endif | |
592 } | |
588 vim_free(fenc); | 593 vim_free(fenc); |
589 } | 594 } |
590 #endif | 595 #endif |
591 #ifdef FEAT_AUTOCMD | 596 #ifdef FEAT_AUTOCMD |
592 apply_autocmds_exarg(EVENT_BUFNEWFILE, sfname, sfname, | 597 apply_autocmds_exarg(EVENT_BUFNEWFILE, sfname, sfname, |
2106 #endif | 2111 #endif |
2107 | 2112 |
2108 #ifdef FEAT_MBYTE | 2113 #ifdef FEAT_MBYTE |
2109 /* If editing a new file: set 'fenc' for the current buffer. */ | 2114 /* If editing a new file: set 'fenc' for the current buffer. */ |
2110 if (newfile) | 2115 if (newfile) |
2116 { | |
2111 set_string_option_direct((char_u *)"fenc", -1, fenc, | 2117 set_string_option_direct((char_u *)"fenc", -1, fenc, |
2112 OPT_FREE|OPT_LOCAL); | 2118 OPT_FREE|OPT_LOCAL); |
2119 # ifdef FEAT_EVAL | |
2120 set_option_scriptID((char_u *)"fenc", current_SID); | |
2121 # endif | |
2122 } | |
2113 if (fenc_alloced) | 2123 if (fenc_alloced) |
2114 vim_free(fenc); | 2124 vim_free(fenc); |
2115 # ifdef USE_ICONV | 2125 # ifdef USE_ICONV |
2116 if (iconv_fd != (iconv_t)-1) | 2126 if (iconv_fd != (iconv_t)-1) |
2117 { | 2127 { |