aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChong Yidong2007-03-30 23:43:16 +0000
committerChong Yidong2007-03-30 23:43:16 +0000
commitbd8abbc4395b221657584b86df55282aa39b7885 (patch)
treefff275bf2b3afa8a88d9baced35d7d1116117ef0
parent89c269bf27894783bfe329da69e6a0b61837c487 (diff)
downloademacs-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.texi91
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
1676that delimit the vector. 1675that 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
1679for non-@acronym{ASCII} characters. @xref{Non-ASCII Rebinding}. 1678for 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}.
1817between @key{TAB} and @kbd{C-i} (and likewise for other such pairs), 1816between @key{TAB} and @kbd{C-i} (and likewise for other such pairs),
1818because the terminal sends the same character in both cases. 1817because 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}
1826characters, such as accented letters, rebinding these keys
1827must be done by using a vector like this@footnote{You must
1828avoid the string syntax for binding
1829non-@acronym{ASCII} characters, since they will be
1830interpreted as meta keys. @xref{Strings of Events,,,elisp,
1831The Emacs Lisp Reference Manual}.}:
1832
1833@example
1834(global-set-key [?@var{char}] 'some-function)
1835@end example
1836
1837@noindent
1838Type @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},
1841you should specify a coding system for that file that supports the
1842character in question. @xref{Init Non-ASCII}.
1843
1844 @strong{Warning:} if you change the keyboard encoding, or change
1845between multibyte and unibyte mode, or anything that would alter which
1846code @kbd{C-q} would insert for that character, you'll need to edit
1847the Lisp expression accordingly, to use the character code generated
1848by @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.
2176a Meta character, as in @samp{\M-a} for @kbd{Meta-A} or @samp{\M-\C-a} for 2146a 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} 2150non-@acronym{ASCII} in your init file.
2181@anchor{Init Non-ASCII}If you want to include non-@acronym{ASCII}
2182characters in strings in your init
2183file, you should consider putting a @w{@samp{-*-coding:
2184@var{coding-system}-*-}} tag on the first line which states the coding
2185system used to save your @file{.emacs}, as explained in @ref{Recognize
2186Coding}. This is because the defaults for decoding non-@acronym{ASCII} text might
2187not yet be set up by the time Emacs reads those parts of your init file
2188which use such strings, possibly leading Emacs to decode those strings
2189incorrectly.
2190 2151
2191@item Characters: 2152@item Characters:
2192Lisp character constant syntax consists of a @samp{?} followed by 2153Lisp character constant syntax consists of a @samp{?} followed by
@@ -2195,7 +2156,7 @@ Examples: @code{?x}, @code{?\n}, @code{?\"}, @code{?\)}. Note that
2195strings and characters are not interchangeable in Lisp; some contexts 2156strings and characters are not interchangeable in Lisp; some contexts
2196require one and some contexts require the other. 2157require 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
2199keys which send non-@acronym{ASCII} characters. 2160keys 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
2504name in the system's data base of users. 2465name 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
2476contains non-@acronym{ASCII} characters, such as accented letters, in
2477strings or key bindings.
2478
2479 If you want to use non-@acronym{ASCII} characters in your init file,
2480you should put a @w{@samp{-*-coding: @var{coding-system}-*-}} tag on
2481the first line of the init file, and specify a coding system that
2482supports the character(s) in question. @xref{Recognize Coding}. This
2483is because the defaults for decoding non-@acronym{ASCII} text might
2484not yet be set up by the time Emacs reads those parts of your init
2485file which use such strings, possibly leading Emacs to decode those
2486strings incorrectly. You should then avoid adding Emacs Lisp code
2487that 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
2491Rebinding}). The string syntax cannot be used, since the
2492non-@acronym{ASCII} characters will be interpreted as meta keys. For
2493instance:
2494
2495@example
2496(global-set-key [?@var{char}] 'some-function)
2497@end example
2498
2499@noindent
2500Type @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
2503between multibyte and unibyte mode, or anything that would alter which
2504code @kbd{C-q} would insert for that character, this keybinding may
2505stop working. It is therefore advisable to use one and only one
2506coding system, for your init file as well as the files you edit. For
2507example, don't mix the @samp{latin-1} and @samp{latin-9} coding
2508systems.
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