Find a coding system for a file FILENAME of which SIZE bytes follow point.
These bytes should include at least the first 1k of the file
and the last 3k of the file, but the middle may be omitted.
The function checks FILENAME against the variable `auto-coding-alist'.
If FILENAME doesn't match any entries in the variable, it checks the
contents of the current buffer following point against
`auto-coding-regexp-alist'. If no match is found, it checks for a
`coding:' tag in the first one or two lines following point. If no
`coding:' tag is found, it checks any local variables list in the last
3K bytes out of the SIZE bytes. Finally, if none of these methods
succeed, it checks to see if any function in `auto-coding-functions'
gives a match.
If a coding system is specified, the return value is a cons
(CODING . SOURCE), where CODING is the specified coding system and
SOURCE is a symbol `auto-coding-alist', `auto-coding-regexp-alist',
`:coding', or `auto-coding-functions' indicating by what CODING is
specified. Note that the validity of CODING is not checked;
it's the caller's responsibility to check it. If nothing is specified, the return value is nil.