diff options
| author | Richard M. Stallman | 2003-06-04 09:26:06 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2003-06-04 09:26:06 +0000 |
| commit | 8e082eccda8f1560faee5666303e1be6cf4c9aa2 (patch) | |
| tree | 1360172f81268d3315f13e88c138bc6b38372b76 | |
| parent | beab64dc855fec1abd9b0c95f3da839d7fb20163 (diff) | |
| download | emacs-8e082eccda8f1560faee5666303e1be6cf4c9aa2.tar.gz emacs-8e082eccda8f1560faee5666303e1be6cf4c9aa2.zip | |
(Init Rebinding): Replace previous change with xref.
(Non-ASCII Rebinding): Explain that issue more briefly here.
| -rw-r--r-- | man/custom.texi | 48 |
1 files changed, 10 insertions, 38 deletions
diff --git a/man/custom.texi b/man/custom.texi index 98a42b33891..4a89f8f086b 100644 --- a/man/custom.texi +++ b/man/custom.texi | |||
| @@ -1712,41 +1712,8 @@ As you see, you represent a multi-character key sequence with a vector | |||
| 1712 | by listing each of the characters within the square brackets that | 1712 | by listing each of the characters within the square brackets that |
| 1713 | delimit the vector. | 1713 | delimit the vector. |
| 1714 | 1714 | ||
| 1715 | Language and encoding settings can be a reason for failing key | 1715 | Language and coding systems can cause problems with key bindings |
| 1716 | binding. For instance, say you have put the following in your init | 1716 | for non-ASCII characters. @xref{Non-ASCII Rebinding}. |
| 1717 | file: | ||
| 1718 | |||
| 1719 | @example | ||
| 1720 | (global-set-key [?\M-ö] 'shell) | ||
| 1721 | @end example | ||
| 1722 | |||
| 1723 | @noindent | ||
| 1724 | Now it can happen that the ö character read from the keyboard is | ||
| 1725 | actually different from the ö character read from your init file, even | ||
| 1726 | though they look the same. In this case, Emacs will not do what you | ||
| 1727 | intended. First you should check whether they are the same or | ||
| 1728 | different. In the above example, you would position point (the cursor) | ||
| 1729 | on the ö character and hit @kbd{C-u C-x =} (the @kbd{C-u} part is | ||
| 1730 | important). The second line of the output will contain the charset. | ||
| 1731 | Now hit the ö key and position point on the character thus produced. | ||
| 1732 | Again, hit @kbd{C-u C-x =}. If the two charsets are different, then you | ||
| 1733 | have found the problem. The solution involves putting a `coding cookie' | ||
| 1734 | in your init file, @pxref{File Variables}. For example, suppose that | ||
| 1735 | the ö character from the init file has charset latin-iso8859-1 whereas | ||
| 1736 | the ö character from the keyboard has charset latin-iso8859-15. The | ||
| 1737 | solution is to put a coding cookie into the first line of the | ||
| 1738 | @file{.emacs} file, as follows: | ||
| 1739 | |||
| 1740 | @example | ||
| 1741 | ;; -*- coding: iso8859-15; -*- | ||
| 1742 | @end example | ||
| 1743 | |||
| 1744 | @noindent | ||
| 1745 | @xref{Non-ASCII Rebinding}, if the charset printed by @kbd{C-u C-x =} is | ||
| 1746 | `eight-bit-graphic'. | ||
| 1747 | |||
| 1748 | If the variable @code{keyboard-coding-system} is nil, it is probably | ||
| 1749 | best to set it to the right value, according to the locale you work in. | ||
| 1750 | 1717 | ||
| 1751 | @node Function Keys | 1718 | @node Function Keys |
| 1752 | @subsection Rebinding Function Keys | 1719 | @subsection Rebinding Function Keys |
| @@ -1885,10 +1852,15 @@ Events,,,elisp, The Emacs Lisp Reference Manual}.}, like this: | |||
| 1885 | @noindent | 1852 | @noindent |
| 1886 | Type @kbd{C-q} followed by the key you want to bind, to insert @var{char}. | 1853 | Type @kbd{C-q} followed by the key you want to bind, to insert @var{char}. |
| 1887 | 1854 | ||
| 1888 | If you don't specify the keyboard coding system, that approach won't | 1855 | Since this puts a non-ASCII character in the @file{.emacs}, you should |
| 1856 | specify the proper coding system for that file. @xref{Init Syntax}. | ||
| 1857 | Specify the same coding system for the file that you use for your | ||
| 1858 | keyboard. | ||
| 1859 | |||
| 1860 | If you don't specify a keyboard coding system, that approach won't | ||
| 1889 | work. Instead, you need to find out the actual code that the terminal | 1861 | work. Instead, you need to find out the actual code that the terminal |
| 1890 | sends. The easiest way to do this in Emacs is to create an empty buffer | 1862 | sends. The easiest way to do this in Emacs is to create an empty |
| 1891 | with @kbd{C-x b temp @key{RET}}, make it unibyte with @kbd{M-x | 1863 | buffer with @kbd{C-x b temp @key{RET}}, make it unibyte with @kbd{M-x |
| 1892 | toggle-enable-multibyte-characters @key{RET}}, then type the key to | 1864 | toggle-enable-multibyte-characters @key{RET}}, then type the key to |
| 1893 | insert the character into this buffer. | 1865 | insert the character into this buffer. |
| 1894 | 1866 | ||