aboutsummaryrefslogtreecommitdiffstats
path: root/doc/lispref
diff options
context:
space:
mode:
authorEli Zaretskii2018-09-20 09:41:55 +0300
committerEli Zaretskii2018-09-20 09:41:55 +0300
commitd28d54c76754759e5f0fc8254541fbb4ef6a21d8 (patch)
tree82b1085d14e622b02456145fe0a2230eb9f0ac05 /doc/lispref
parentb3baf997c8e9bbff351e0bf24b8fdae8831ec1df (diff)
downloademacs-d28d54c76754759e5f0fc8254541fbb4ef6a21d8.tar.gz
emacs-d28d54c76754759e5f0fc8254541fbb4ef6a21d8.zip
More accurate docs for 'text-char-description'
* src/keymap.c (Ftext_char_description): * doc/lispref/help.texi (Describing Characters): More accurate description of 'text-char-description'. Remove incorrect examples from the ELisp manual. (Bug#32743)
Diffstat (limited to 'doc/lispref')
-rw-r--r--doc/lispref/help.texi30
1 files changed, 10 insertions, 20 deletions
diff --git a/doc/lispref/help.texi b/doc/lispref/help.texi
index a23bc413d25..2688a2bff6e 100644
--- a/doc/lispref/help.texi
+++ b/doc/lispref/help.texi
@@ -556,13 +556,15 @@ brackets.
556 556
557@defun text-char-description character 557@defun text-char-description character
558This function returns a string describing @var{character} in the 558This function returns a string describing @var{character} in the
559standard Emacs notation for characters that can appear in text---like 559standard Emacs notation for characters that can appear in
560@code{single-key-description}, except that the argument must be a 560text---similar to @code{single-key-description}, except that the
561valid character code that passes a @code{characterp} test 561argument must be a valid character code that passes a
562(@pxref{Character Codes}), control characters are represented with a 562@code{characterp} test (@pxref{Character Codes}). The function
563leading caret (which is how control characters in Emacs buffers are 563produces descriptions of control characters with a leading caret
564usually displayed), and the 2**7 bit is treated as the Meta bit, 564(which is how Emacs usually displays control characters in buffers).
565whereas @code{single-key-description} uses the 2**27 bit for Meta. 565Characters with modifier bits will cause this function to signal an
566error (@acronym{ASCII} characters with the Control modifier are an
567exception, they are represented as control characters).
566 568
567@smallexample 569@smallexample
568@group 570@group
@@ -571,19 +573,7 @@ whereas @code{single-key-description} uses the 2**27 bit for Meta.
571@end group 573@end group
572@group 574@group
573(text-char-description ?\M-m) 575(text-char-description ?\M-m)
574 @result{} "\xed" 576 @error{} Wrong type argument: characterp, 134217837
575@end group
576@group
577(text-char-description ?\C-\M-m)
578 @result{} "\x8d"
579@end group
580@group
581(text-char-description (+ 128 ?m))
582 @result{} "M-m"
583@end group
584@group
585(text-char-description (+ 128 ?\C-m))
586 @result{} "M-^M"
587@end group 577@end group
588@end smallexample 578@end smallexample
589@end defun 579@end defun