Variable: coding-system-for-write

coding-system-for-write is a variable defined in coding.c.

Value

nil

Documentation

Specify the coding system for write operations.

Programs bind this variable with let, but you should not set it globally. If the value is a coding system, it is used for encoding of output, when writing it to a file and when sending it to a file or subprocess.

If this does not specify a coding system, an appropriate element is used from one of the coding system alists. There are three such tables: file-coding-system-alist, process-coding-system-alist, and network-coding-system-alist. For output to files, if the above procedure does not specify a coding system, the value of buffer-file-coding-system is used.

Probably introduced at or before Emacs version 20.1.

Source Code

// Defined in /usr/src/emacs/src/coding.c
  DEFVAR_LISP ("coding-system-for-write", Vcoding_system_for_write,
	       doc: /* Specify the coding system for write operations.
Programs bind this variable with `let', but you should not set it globally.
If the value is a coding system, it is used for encoding of output,
when writing it to a file and when sending it to a file or subprocess.

If this does not specify a coding system, an appropriate element
is used from one of the coding system alists.
There are three such tables: `file-coding-system-alist',
`process-coding-system-alist', and `network-coding-system-alist'.
For output to files, if the above procedure does not specify a coding system,
the value of `buffer-file-coding-system' is used.  */);