diff options
| author | Eli Zaretskii | 2006-05-12 14:33:29 +0000 |
|---|---|---|
| committer | Eli Zaretskii | 2006-05-12 14:33:29 +0000 |
| commit | e1166db9f3255bf22163d79c471f65dd54a50cd9 (patch) | |
| tree | dec770d9279245ddb7ef4cc191897da8b19f45da | |
| parent | 3b7694ef71f98476d76e40f8ac8501fcd2896f3f (diff) | |
| download | emacs-e1166db9f3255bf22163d79c471f65dd54a50cd9.tar.gz emacs-e1166db9f3255bf22163d79c471f65dd54a50cd9.zip | |
(Lisp and Coding Systems): Document coding-system-eol-type. Add index entries
for eol conversion.
| -rw-r--r-- | lispref/nonascii.texi | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/lispref/nonascii.texi b/lispref/nonascii.texi index c526d419766..ecffd4ae488 100644 --- a/lispref/nonascii.texi +++ b/lispref/nonascii.texi | |||
| @@ -805,6 +805,35 @@ If that is valid, it returns @var{coding-system}. | |||
| 805 | Otherwise it signals an error with condition @code{coding-system-error}. | 805 | Otherwise it signals an error with condition @code{coding-system-error}. |
| 806 | @end defun | 806 | @end defun |
| 807 | 807 | ||
| 808 | @cindex EOL conversion | ||
| 809 | @cindex end-of-line conversion | ||
| 810 | @cindex line end conversion | ||
| 811 | @defun coding-system-eol-type coding-system | ||
| 812 | This function returns the type of end-of-line (a.k.a.@: @dfn{eol}) | ||
| 813 | conversion used by @var{coding-system}. If @var{coding-system} | ||
| 814 | specifies a certain eol conversion, the return value is an integer 0, | ||
| 815 | 1, or 2, standing for @code{unix}, @code{dos}, and @code{mac}, | ||
| 816 | respectively. If @var{coding-system} doesn't specify eol conversion | ||
| 817 | explicitly, the return value is a vector of coding systems, each one | ||
| 818 | with one of the possible eol conversion types, like this: | ||
| 819 | |||
| 820 | @lisp | ||
| 821 | (coding-system-eol-type 'latin-1) | ||
| 822 | @result{} [latin-1-unix latin-1-dos latin-1-mac] | ||
| 823 | @end lisp | ||
| 824 | |||
| 825 | @noindent | ||
| 826 | If this function returns a vector, Emacs will decide, as part of the | ||
| 827 | text encoding or decoding process, what eol conversion to use. For | ||
| 828 | decoding, the end-of-line format of the text is auto-detected, and the | ||
| 829 | eol conversion is set to match it (e.g., DOS-style CRLF format will | ||
| 830 | imply @code{dos} eol conversion). For encoding, the eol conversion is | ||
| 831 | taken from the appropriate default coding system (e.g., | ||
| 832 | @code{default-buffer-file-coding-system} for | ||
| 833 | @code{buffer-file-coding-system}), or from the default eol conversion | ||
| 834 | appropriate for the underlying platform. | ||
| 835 | @end defun | ||
| 836 | |||
| 808 | @defun coding-system-change-eol-conversion coding-system eol-type | 837 | @defun coding-system-change-eol-conversion coding-system eol-type |
| 809 | This function returns a coding system which is like @var{coding-system} | 838 | This function returns a coding system which is like @var{coding-system} |
| 810 | except for its eol conversion, which is specified by @code{eol-type}. | 839 | except for its eol conversion, which is specified by @code{eol-type}. |