diff options
| author | Eli Zaretskii | 2016-09-23 10:52:07 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2016-09-23 10:52:07 +0300 |
| commit | 2b8c5f0bffd329616f26721325da57f4ac06cabb (patch) | |
| tree | e15bcd7514dbb103b41b374c93ab3efe490e35e7 /src/buffer.h | |
| parent | 0d016ca1164463320a77482df88ef81cc34056d1 (diff) | |
| download | emacs-2b8c5f0bffd329616f26721325da57f4ac06cabb.tar.gz emacs-2b8c5f0bffd329616f26721325da57f4ac06cabb.zip | |
Update commentary of STRING_CHAR and FETCH_MULTIBYTE_CHAR
* src/character.h (STRING_CHAR):
* src/buffer.h (FETCH_MULTIBYTE_CHAR): Update commentary: these
two macros no longer do any character unification, so the caveats
in those comments are no longer pertinent.
Diffstat (limited to 'src/buffer.h')
| -rw-r--r-- | src/buffer.h | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/src/buffer.h b/src/buffer.h index 87b7cee4413..a53ef12f35e 100644 --- a/src/buffer.h +++ b/src/buffer.h | |||
| @@ -1182,17 +1182,7 @@ buffer_has_overlays (void) | |||
| 1182 | 1182 | ||
| 1183 | /* Return character code of multi-byte form at byte position POS. If POS | 1183 | /* Return character code of multi-byte form at byte position POS. If POS |
| 1184 | doesn't point the head of valid multi-byte form, only the byte at | 1184 | doesn't point the head of valid multi-byte form, only the byte at |
| 1185 | POS is returned. No range checking. | 1185 | POS is returned. No range checking. */ |
| 1186 | |||
| 1187 | WARNING: The character returned by this macro could be "unified" | ||
| 1188 | inside STRING_CHAR, if the original character in the buffer belongs | ||
| 1189 | to one of the Private Use Areas (PUAs) of codepoints that Emacs | ||
| 1190 | uses to support non-unified CJK characters. If that happens, | ||
| 1191 | CHAR_BYTES will return a value that is different from the length of | ||
| 1192 | the original multibyte sequence stored in the buffer. Therefore, | ||
| 1193 | do _not_ use FETCH_MULTIBYTE_CHAR if you need to advance through | ||
| 1194 | the buffer to the next character after fetching this one. Instead, | ||
| 1195 | use either FETCH_CHAR_ADVANCE or STRING_CHAR_AND_LENGTH. */ | ||
| 1196 | 1186 | ||
| 1197 | INLINE int | 1187 | INLINE int |
| 1198 | FETCH_MULTIBYTE_CHAR (ptrdiff_t pos) | 1188 | FETCH_MULTIBYTE_CHAR (ptrdiff_t pos) |