Variable: auto-coding-regexp-alist

auto-coding-regexp-alist is a customizable variable defined in mule.el.gz.

Value

(("\\`BABYL OPTIONS:[   ]*-\\*-[        ]*rmail[        ]*-\\*-"
  . no-conversion)
 ("\\`\376\377" . utf-16be-with-signature)
 ("\\`\377\376" . utf-16le-with-signature)
 ("\\`\357\273\277" . utf-8-with-signature)
 ("\\`;ELC���" . emacs-mule))

Documentation

Alist of patterns vs corresponding coding systems.

Each element looks like (REGEXP . CODING-SYSTEM). A file whose first bytes match REGEXP is decoded by CODING-SYSTEM on reading.

The settings in this alist take priority over coding: tags in the file (see the function set-auto-coding) and the contents of file-coding-system-alist.

View in manual

Probably introduced at or before Emacs version 21.1.

Source Code

;; Defined in /usr/src/emacs/lisp/international/mule.el.gz
(defcustom auto-coding-regexp-alist
  '(("\\`BABYL OPTIONS:[ \t]*-\\*-[ \t]*rmail[ \t]*-\\*-" . no-conversion)
    ("\\`\xFE\xFF" . utf-16be-with-signature)
    ("\\`\xFF\xFE" . utf-16le-with-signature)
    ("\\`\xEF\xBB\xBF" . utf-8-with-signature)
    ("\\`;ELC\024\0\0\0" . emacs-mule))	; Emacs 20-compiled
  "Alist of patterns vs corresponding coding systems.
Each element looks like (REGEXP . CODING-SYSTEM).
A file whose first bytes match REGEXP is decoded by CODING-SYSTEM on reading.

The settings in this alist take priority over `coding:' tags
in the file (see the function `set-auto-coding')
and the contents of `file-coding-system-alist'."
  :group 'files
  :group 'mule
  :type '(repeat (cons (regexp :tag "Regexp")
		       (symbol :tag "Coding system"))))