diff options
author | Philipp Stephani <phst@google.com> | 2016-04-21 14:47:05 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2016-04-21 19:29:40 -0700 |
commit | a58d4e3c0f513294b9aebacb539542ad1b87be19 (patch) | |
tree | e28611c02a0923a760717bee07a88cbda2c5a24a /doc | |
parent | de7d5f36e0f3261a7300fa3a3d87ae3b758b8a73 (diff) | |
download | emacs-a58d4e3c0f513294b9aebacb539542ad1b87be19.tar.gz |
Add documentation for character name escapes
Diffstat (limited to 'doc')
-rw-r--r-- | doc/lispref/nonascii.texi | 2 | ||||
-rw-r--r-- | doc/lispref/objects.texi | 10 |
2 files changed, 11 insertions, 1 deletions
diff --git a/doc/lispref/nonascii.texi b/doc/lispref/nonascii.texi index 9cf3b5750f2..66ad9aca71e 100644 --- a/doc/lispref/nonascii.texi +++ b/doc/lispref/nonascii.texi @@ -633,7 +633,7 @@ This function returns the value of @var{char}'s @var{propname} property. @end group @group ;; U+2163 ROMAN NUMERAL FOUR -(get-char-code-property ?\u2163 'numeric-value) +(get-char-code-property ?\N@{ROMAN NUMERAL FOUR@} 'numeric-value) @result{} 4 @end group @group diff --git a/doc/lispref/objects.texi b/doc/lispref/objects.texi index 324593068d5..96b334d2b81 100644 --- a/doc/lispref/objects.texi +++ b/doc/lispref/objects.texi @@ -387,6 +387,16 @@ up to three octal digits; thus, @samp{?\101} for the character for the character @kbd{C-b}. Only characters up to octal code 777 can be specified this way. + Fourthly, you can specify characters by their name. A character +name escape sequence consists of a backslash, @samp{N@{}, the Unicode +character name, and @samp{@}}. Alternatively, you can also put the +numeric code point value between the braces, using the syntax +@samp{\N@{U+nnnn@}}, where @samp{nnnn} denotes between one and eight +hexadecimal digits. Thus, @samp{?\N@{LATIN CAPITAL LETTER A@}} and +@samp{?\N@{U+41@}} both denote the character @kbd{A}. To simplify +entering multi-line strings, you can replace spaces in the character +names by arbitrary non-empty sequence of whitespace (e.g., newlines). + These escape sequences may also be used in strings. @xref{Non-ASCII in Strings}. |