Function: set-auto-coding

set-auto-coding is a byte-compiled function defined in mule.el.gz.

Signature

(set-auto-coding FILENAME SIZE)

Documentation

Return coding system for a file FILENAME of which SIZE bytes follow point.

See find-auto-coding for how the coding system is found. Return nil if an invalid coding system is found.

The variable set-auto-coding-function (which see) is set to this function by default.

View in manual

Source Code

;; Defined in /usr/src/emacs/lisp/international/mule.el.gz
(defun set-auto-coding (filename size)
  "Return coding system for a file FILENAME of which SIZE bytes follow point.
See `find-auto-coding' for how the coding system is found.
Return nil if an invalid coding system is found.

The variable `set-auto-coding-function' (which see) is set to this
function by default."
  (let ((found (find-auto-coding filename size)))
    (if (and found (coding-system-p (car found)))
	(car found))))