Variable: set-auto-coding-function
set-auto-coding-function is a variable defined in fileio.c.
Value
set-auto-coding
Documentation
If non-nil, a function to call to decide a coding system of file.
Two arguments are passed to this function: the file name
and the length of a file contents following the point.
This function should return a coding system to decode the file contents.
It should check the file name against auto-coding-alist.
If no coding system is decided, it should check a coding system
specified in the heading lines with the format:
-*- ... coding: CODING-SYSTEM; ... -*-
or local variable spec of the tailing lines with coding: tag.
Source Code
// Defined in /usr/src/emacs/src/fileio.c
DEFVAR_LISP ("set-auto-coding-function",
Vset_auto_coding_function,
doc: /* If non-nil, a function to call to decide a coding system of file.
Two arguments are passed to this function: the file name
and the length of a file contents following the point.
This function should return a coding system to decode the file contents.
It should check the file name against `auto-coding-alist'.
If no coding system is decided, it should check a coding system
specified in the heading lines with the format:
-*- ... coding: CODING-SYSTEM; ... -*-
or local variable spec of the tailing lines with `coding:' tag. */);