Saturday, April 09, 2005

Emacs Mule

from Emacs help:

C-x RET f runs the command set-buffer-file-coding-system which is an interactive compiled Lisp function in `international/mule'. (set-buffer-file-coding-system CODING-SYSTEM &optional FORCE)

Set the file coding-system of the current buffer to CODING-SYSTEM. This means that when you save the buffer, it will be converted according to CODING-SYSTEM. For a list of possible values of CODING-SYSTEM, use M-x list-coding-systems.

If the buffer's previous file coding-system value specifies end-of-line conversion, and CODING-SYSTEM does not specify one, CODING-SYSTEM is merged with the already-specified end-of-line conversion.

If the buffer's previous file coding-system value specifies text conversion, and CODING-SYSTEM does not specify one, CODING-SYSTEM is merged with the already-specified text conversion.

However, if the optional prefix argument FORCE is non-nil, then CODING-SYSTEM is used exactly as specified.

This marks the buffer modified so that the succeeding C-x C-s surely saves the buffer with CODING-SYSTEM. From a program, if you don't want to mark the buffer modified, just set the variable `buffer-file-coding-system' directly.

from C-x RET C-h

Global Bindings Starting With C-x RET:
key             binding
---             -------

C-x RET l       set-language-environment
C-x RET c       universal-coding-system-argument
C-x RET C-\     set-input-method
C-x RET X       set-next-selection-coding-system
C-x RET x       set-selection-coding-system
C-x RET p       set-buffer-process-coding-system
C-x RET k       set-keyboard-coding-system
C-x RET t       set-terminal-coding-system
C-x RET f       set-buffer-file-coding-system

No comments :