Function: auto-coding-regexp-alist-lookup
auto-coding-regexp-alist-lookup is a byte-compiled function defined in
mule.el.gz.
Signature
(auto-coding-regexp-alist-lookup FROM TO)
Documentation
Lookup auto-coding-regexp-alist for the contents of the current buffer.
The value is a coding system is specified for the region FROM and TO, or nil.
Source Code
;; Defined in /usr/src/emacs/lisp/international/mule.el.gz
(defun auto-coding-regexp-alist-lookup (from to)
"Lookup `auto-coding-regexp-alist' for the contents of the current buffer.
The value is a coding system is specified for the region FROM and TO,
or nil."
(save-excursion
(goto-char from)
(let ((alist auto-coding-regexp-alist)
coding-system)
(while (and alist (not coding-system))
(let ((regexp (car (car alist))))
(if enable-multibyte-characters
(setq regexp (string-to-multibyte regexp)))
(if (re-search-forward regexp to t)
(setq coding-system (cdr (car alist)))
(setq alist (cdr alist)))))
coding-system)))