Function: find-coding-systems-region
find-coding-systems-region is a byte-compiled function defined in
mule-cmds.el.gz.
Signature
(find-coding-systems-region FROM TO)
Documentation
Return a list of proper coding systems to encode a text between FROM and TO.
If FROM is a string, find coding systems in that instead of the buffer. All coding systems in the list can safely encode any multibyte characters in the text.
If the text contains no multibyte characters, return a list of a single
element undecided.
Probably introduced at or before Emacs version 20.3.
Source Code
;; Defined in /usr/src/emacs/lisp/international/mule-cmds.el.gz
(defun find-coding-systems-region (from to)
"Return a list of proper coding systems to encode a text between FROM and TO.
If FROM is a string, find coding systems in that instead of the buffer.
All coding systems in the list can safely encode any multibyte characters
in the text.
If the text contains no multibyte characters, return a list of a single
element `undecided'."
(let ((codings (find-coding-systems-region-internal from to)))
(if (eq codings t)
;; The text contains only ASCII characters. Any coding
;; systems are safe.
'(undecided)
;; We need copy-sequence because sorting will alter the argument.
(sort-coding-systems (copy-sequence codings)))))