diff options
| author | Chong Yidong | 2007-03-30 23:43:16 +0000 |
|---|---|---|
| committer | Chong Yidong | 2007-03-30 23:43:16 +0000 |
| commit | bd8abbc4395b221657584b86df55282aa39b7885 (patch) | |
| tree | fff275bf2b3afa8a88d9baced35d7d1116117ef0 | |
| parent | 89c269bf27894783bfe329da69e6a0b61837c487 (diff) | |
| download | emacs-bd8abbc4395b221657584b86df55282aa39b7885.tar.gz emacs-bd8abbc4395b221657584b86df55282aa39b7885.zip | |
(Non-ASCII Rebinding): Node deleted. Material moved to Init Non-ASCII.
(Init Rebinding, Init Syntax): Link to Init Non-ASCII instead.
(Init Non-ASCII): New node.
| -rw-r--r-- | man/custom.texi | 91 |
1 files changed, 47 insertions, 44 deletions
diff --git a/man/custom.texi b/man/custom.texi index 40a0f8d0b2c..9c05d835b94 100644 --- a/man/custom.texi +++ b/man/custom.texi | |||
| @@ -1276,7 +1276,6 @@ name, which usually consists of lower-case letters and hyphens. | |||
| 1276 | * Init Rebinding:: Rebinding keys with your init file, @file{.emacs}. | 1276 | * Init Rebinding:: Rebinding keys with your init file, @file{.emacs}. |
| 1277 | * Function Keys:: Rebinding terminal function keys. | 1277 | * Function Keys:: Rebinding terminal function keys. |
| 1278 | * Named ASCII Chars:: Distinguishing @key{TAB} from @kbd{C-i}, and so on. | 1278 | * Named ASCII Chars:: Distinguishing @key{TAB} from @kbd{C-i}, and so on. |
| 1279 | * Non-ASCII Rebinding:: Rebinding non-@acronym{ASCII} characters such as Latin-1. | ||
| 1280 | * Mouse Buttons:: Rebinding mouse buttons in Emacs. | 1279 | * Mouse Buttons:: Rebinding mouse buttons in Emacs. |
| 1281 | * Disabling:: Disabling a command means confirmation is required | 1280 | * Disabling:: Disabling a command means confirmation is required |
| 1282 | before it can be executed. This is done to protect | 1281 | before it can be executed. This is done to protect |
| @@ -1676,7 +1675,7 @@ by listing all of the characters, in order, within the square brackets | |||
| 1676 | that delimit the vector. | 1675 | that delimit the vector. |
| 1677 | 1676 | ||
| 1678 | Language and coding systems can cause problems with key bindings | 1677 | Language and coding systems can cause problems with key bindings |
| 1679 | for non-@acronym{ASCII} characters. @xref{Non-ASCII Rebinding}. | 1678 | for non-@acronym{ASCII} characters. @xref{Init Non-ASCII}. |
| 1680 | 1679 | ||
| 1681 | @node Function Keys | 1680 | @node Function Keys |
| 1682 | @subsection Rebinding Function Keys | 1681 | @subsection Rebinding Function Keys |
| @@ -1817,36 +1816,6 @@ this @acronym{ASCII} character, and another for the ``function key'' @code{tab}. | |||
| 1817 | between @key{TAB} and @kbd{C-i} (and likewise for other such pairs), | 1816 | between @key{TAB} and @kbd{C-i} (and likewise for other such pairs), |
| 1818 | because the terminal sends the same character in both cases. | 1817 | because the terminal sends the same character in both cases. |
| 1819 | 1818 | ||
| 1820 | @node Non-ASCII Rebinding | ||
| 1821 | @subsection Non-@acronym{ASCII} Characters on the Keyboard | ||
| 1822 | @cindex rebinding non-@acronym{ASCII} keys | ||
| 1823 | @cindex non-@acronym{ASCII} keys, binding | ||
| 1824 | |||
| 1825 | If your keyboard has keys that send non-@acronym{ASCII} | ||
| 1826 | characters, such as accented letters, rebinding these keys | ||
| 1827 | must be done by using a vector like this@footnote{You must | ||
| 1828 | avoid the string syntax for binding | ||
| 1829 | non-@acronym{ASCII} characters, since they will be | ||
| 1830 | interpreted as meta keys. @xref{Strings of Events,,,elisp, | ||
| 1831 | The Emacs Lisp Reference Manual}.}: | ||
| 1832 | |||
| 1833 | @example | ||
| 1834 | (global-set-key [?@var{char}] 'some-function) | ||
| 1835 | @end example | ||
| 1836 | |||
| 1837 | @noindent | ||
| 1838 | Type @kbd{C-q} followed by the key you want to bind, to insert @var{char}. | ||
| 1839 | |||
| 1840 | Since this puts a non-@acronym{ASCII} character in the @file{.emacs}, | ||
| 1841 | you should specify a coding system for that file that supports the | ||
| 1842 | character in question. @xref{Init Non-ASCII}. | ||
| 1843 | |||
| 1844 | @strong{Warning:} if you change the keyboard encoding, or change | ||
| 1845 | between multibyte and unibyte mode, or anything that would alter which | ||
| 1846 | code @kbd{C-q} would insert for that character, you'll need to edit | ||
| 1847 | the Lisp expression accordingly, to use the character code generated | ||
| 1848 | by @kbd{C-q} in the new mode. | ||
| 1849 | |||
| 1850 | @node Mouse Buttons | 1819 | @node Mouse Buttons |
| 1851 | @subsection Rebinding Mouse Buttons | 1820 | @subsection Rebinding Mouse Buttons |
| 1852 | @cindex mouse button events | 1821 | @cindex mouse button events |
| @@ -2126,6 +2095,7 @@ Manual}. | |||
| 2126 | * Init Examples:: How to do some things with an init file. | 2095 | * Init Examples:: How to do some things with an init file. |
| 2127 | * Terminal Init:: Each terminal type can have an init file. | 2096 | * Terminal Init:: Each terminal type can have an init file. |
| 2128 | * Find Init:: How Emacs finds the init file. | 2097 | * Find Init:: How Emacs finds the init file. |
| 2098 | * Init Non-ASCII:: Using non-ASCII characters in an init file. | ||
| 2129 | @end menu | 2099 | @end menu |
| 2130 | 2100 | ||
| 2131 | @node Init Syntax | 2101 | @node Init Syntax |
| @@ -2176,17 +2146,8 @@ sequences are mandatory. | |||
| 2176 | a Meta character, as in @samp{\M-a} for @kbd{Meta-A} or @samp{\M-\C-a} for | 2146 | a Meta character, as in @samp{\M-a} for @kbd{Meta-A} or @samp{\M-\C-a} for |
| 2177 | @kbd{Control-Meta-A}.@refill | 2147 | @kbd{Control-Meta-A}.@refill |
| 2178 | 2148 | ||
| 2179 | @cindex international characters in @file{.emacs} | 2149 | @xref{Init Non-ASCII}, for information about including |
| 2180 | @cindex non-@acronym{ASCII} characters in @file{.emacs} | 2150 | non-@acronym{ASCII} in your init file. |
| 2181 | @anchor{Init Non-ASCII}If you want to include non-@acronym{ASCII} | ||
| 2182 | characters in strings in your init | ||
| 2183 | file, you should consider putting a @w{@samp{-*-coding: | ||
| 2184 | @var{coding-system}-*-}} tag on the first line which states the coding | ||
| 2185 | system used to save your @file{.emacs}, as explained in @ref{Recognize | ||
| 2186 | Coding}. This is because the defaults for decoding non-@acronym{ASCII} text might | ||
| 2187 | not yet be set up by the time Emacs reads those parts of your init file | ||
| 2188 | which use such strings, possibly leading Emacs to decode those strings | ||
| 2189 | incorrectly. | ||
| 2190 | 2151 | ||
| 2191 | @item Characters: | 2152 | @item Characters: |
| 2192 | Lisp character constant syntax consists of a @samp{?} followed by | 2153 | Lisp character constant syntax consists of a @samp{?} followed by |
| @@ -2195,7 +2156,7 @@ Examples: @code{?x}, @code{?\n}, @code{?\"}, @code{?\)}. Note that | |||
| 2195 | strings and characters are not interchangeable in Lisp; some contexts | 2156 | strings and characters are not interchangeable in Lisp; some contexts |
| 2196 | require one and some contexts require the other. | 2157 | require one and some contexts require the other. |
| 2197 | 2158 | ||
| 2198 | @xref{Non-ASCII Rebinding}, for information about binding commands to | 2159 | @xref{Init Non-ASCII}, for information about binding commands to |
| 2199 | keys which send non-@acronym{ASCII} characters. | 2160 | keys which send non-@acronym{ASCII} characters. |
| 2200 | 2161 | ||
| 2201 | @item True: | 2162 | @item True: |
| @@ -2504,6 +2465,48 @@ otherwise, it looks up the home directory corresponding to that user | |||
| 2504 | name in the system's data base of users. | 2465 | name in the system's data base of users. |
| 2505 | @c LocalWords: backtab | 2466 | @c LocalWords: backtab |
| 2506 | 2467 | ||
| 2468 | @node Init Non-ASCII | ||
| 2469 | @subsection Non-ASCII Characters in Init Files | ||
| 2470 | @cindex international characters in @file{.emacs} | ||
| 2471 | @cindex non-@acronym{ASCII} characters in @file{.emacs} | ||
| 2472 | @cindex non-@acronym{ASCII} keys, binding | ||
| 2473 | @cindex rebinding non-@acronym{ASCII} keys | ||
| 2474 | |||
| 2475 | Language and coding systems may cause problems if your init file | ||
| 2476 | contains non-@acronym{ASCII} characters, such as accented letters, in | ||
| 2477 | strings or key bindings. | ||
| 2478 | |||
| 2479 | If you want to use non-@acronym{ASCII} characters in your init file, | ||
| 2480 | you should put a @w{@samp{-*-coding: @var{coding-system}-*-}} tag on | ||
| 2481 | the first line of the init file, and specify a coding system that | ||
| 2482 | supports the character(s) in question. @xref{Recognize Coding}. This | ||
| 2483 | is because the defaults for decoding non-@acronym{ASCII} text might | ||
| 2484 | not yet be set up by the time Emacs reads those parts of your init | ||
| 2485 | file which use such strings, possibly leading Emacs to decode those | ||
| 2486 | strings incorrectly. You should then avoid adding Emacs Lisp code | ||
| 2487 | that modifies the coding system in other ways, such as calls to | ||
| 2488 | @code{set-language-environment}. | ||
| 2489 | |||
| 2490 | To bind non-@acronym{ASCII} keys, you must use a vector (@pxref{Init | ||
| 2491 | Rebinding}). The string syntax cannot be used, since the | ||
| 2492 | non-@acronym{ASCII} characters will be interpreted as meta keys. For | ||
| 2493 | instance: | ||
| 2494 | |||
| 2495 | @example | ||
| 2496 | (global-set-key [?@var{char}] 'some-function) | ||
| 2497 | @end example | ||
| 2498 | |||
| 2499 | @noindent | ||
| 2500 | Type @kbd{C-q}, followed by the key you want to bind, to insert @var{char}. | ||
| 2501 | |||
| 2502 | @strong{Warning:} if you change the keyboard encoding, or change | ||
| 2503 | between multibyte and unibyte mode, or anything that would alter which | ||
| 2504 | code @kbd{C-q} would insert for that character, this keybinding may | ||
| 2505 | stop working. It is therefore advisable to use one and only one | ||
| 2506 | coding system, for your init file as well as the files you edit. For | ||
| 2507 | example, don't mix the @samp{latin-1} and @samp{latin-9} coding | ||
| 2508 | systems. | ||
| 2509 | |||
| 2507 | @ignore | 2510 | @ignore |
| 2508 | arch-tag: c68abddb-4410-4fb5-925f-63394e971d93 | 2511 | arch-tag: c68abddb-4410-4fb5-925f-63394e971d93 |
| 2509 | @end ignore | 2512 | @end ignore |