aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2001-04-22 14:55:21 +0000
committerRichard M. Stallman2001-04-22 14:55:21 +0000
commit03d4836128deca9580a61c4e9d29b8231b01f67d (patch)
tree54323efcf683059d1f0ed2168165ff2114f654f7
parent9eae55d2835b6a7958565fc2fe5a663db21b4ba5 (diff)
downloademacs-03d4836128deca9580a61c4e9d29b8231b01f67d.tar.gz
emacs-03d4836128deca9580a61c4e9d29b8231b01f67d.zip
Explain binding TAB etc using \t etc.
Minor clarifications.
-rw-r--r--man/custom.texi21
1 files changed, 16 insertions, 5 deletions
diff --git a/man/custom.texi b/man/custom.texi
index b481fdb122a..286d5e9d5cf 100644
--- a/man/custom.texi
+++ b/man/custom.texi
@@ -1304,11 +1304,11 @@ sequence, and so on.
1304@kbd{C-x @key{SELECT}} is meaningful. If you make @key{SELECT} a prefix 1304@kbd{C-x @key{SELECT}} is meaningful. If you make @key{SELECT} a prefix
1305key, then @kbd{@key{SELECT} C-n} makes sense. You can even mix mouse 1305key, then @kbd{@key{SELECT} C-n} makes sense. You can even mix mouse
1306events with keyboard events, but we recommend against it, because such 1306events with keyboard events, but we recommend against it, because such
1307sequences are inconvenient to type in. 1307key sequences are inconvenient to use.
1308 1308
1309 As a user, you can redefine any key; but it might be best to stick to 1309 As a user, you can redefine any key; but it is usually best to stick
1310key sequences that consist of @kbd{C-c} followed by a letter. These 1310to key sequences that consist of @kbd{C-c} followed by a letter.
1311keys are ``reserved for users,'' so they won't conflict with any 1311These keys are ``reserved for users,'' so they won't conflict with any
1312properly designed Emacs extension. The function keys @key{F5} through 1312properly designed Emacs extension. The function keys @key{F5} through
1313@key{F9} are also reserved for users. If you redefine some other key, 1313@key{F9} are also reserved for users. If you redefine some other key,
1314your definition may be overridden by certain extensions or major modes 1314your definition may be overridden by certain extensions or major modes
@@ -1574,6 +1574,15 @@ probably causes an error; it certainly isn't what you want.
1574(global-set-key "\C-xl" 'make-symbolic-link) 1574(global-set-key "\C-xl" 'make-symbolic-link)
1575@end example 1575@end example
1576 1576
1577 To put @key{TAB}, @key{RET}, @key{ESC}, or @key{DEL} in the
1578string, you can use the Emacs Lisp escape sequences, @samp{\t},
1579@samp{\r}, @samp{\e}, and @samp{\d}. Here is an example which binds
1580@kbd{C-x @key{TAB}}:
1581
1582@example
1583(global-set-key "\C-x\t" 'indent-rigidly)
1584@end example
1585
1577 When the key sequence includes function keys or mouse button events, 1586 When the key sequence includes function keys or mouse button events,
1578or non-ASCII characters such as @code{C-=} or @code{H-a}, you must use 1587or non-ASCII characters such as @code{C-=} or @code{H-a}, you must use
1579the more general method of rebinding, which uses a vector to specify the 1588the more general method of rebinding, which uses a vector to specify the
@@ -1599,12 +1608,14 @@ keyboard-modified mouse button):
1599@end example 1608@end example
1600 1609
1601 You can use a vector for the simple cases too. Here's how to rewrite 1610 You can use a vector for the simple cases too. Here's how to rewrite
1602the first two examples, above, to use vectors: 1611the first three examples, above, using vectors:
1603 1612
1604@example 1613@example
1605(global-set-key [?\C-z] 'shell) 1614(global-set-key [?\C-z] 'shell)
1606 1615
1607(global-set-key [?\C-x ?l] 'make-symbolic-link) 1616(global-set-key [?\C-x ?l] 'make-symbolic-link)
1617
1618(global-set-key [?\C-x ?\t] 'indent-rigidly)
1608@end example 1619@end example
1609 1620
1610@node Function Keys 1621@node Function Keys