[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs-25 2b8c5f0: Update commentary of STRING_CHAR and FET
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] emacs-25 2b8c5f0: Update commentary of STRING_CHAR and FETCH_MULTIBYTE_CHAR |
Date: |
Fri, 23 Sep 2016 07:52:25 +0000 (UTC) |
branch: emacs-25
commit 2b8c5f0bffd329616f26721325da57f4ac06cabb
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>
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.
---
src/buffer.h | 12 +-----------
src/character.h | 5 +----
2 files changed, 2 insertions(+), 15 deletions(-)
diff --git a/src/buffer.h b/src/buffer.h
index 87b7cee..a53ef12 100644
--- a/src/buffer.h
+++ b/src/buffer.h
@@ -1182,17 +1182,7 @@ buffer_has_overlays (void)
/* Return character code of multi-byte form at byte position POS. If POS
doesn't point the head of valid multi-byte form, only the byte at
- POS is returned. No range checking.
-
- WARNING: The character returned by this macro could be "unified"
- inside STRING_CHAR, if the original character in the buffer belongs
- to one of the Private Use Areas (PUAs) of codepoints that Emacs
- uses to support non-unified CJK characters. If that happens,
- CHAR_BYTES will return a value that is different from the length of
- the original multibyte sequence stored in the buffer. Therefore,
- do _not_ use FETCH_MULTIBYTE_CHAR if you need to advance through
- the buffer to the next character after fetching this one. Instead,
- use either FETCH_CHAR_ADVANCE or STRING_CHAR_AND_LENGTH. */
+ POS is returned. No range checking. */
INLINE int
FETCH_MULTIBYTE_CHAR (ptrdiff_t pos)
diff --git a/src/character.h b/src/character.h
index d4b6c73..a94ec6d 100644
--- a/src/character.h
+++ b/src/character.h
@@ -308,10 +308,7 @@ enum
}
\
} while (false)
-/* Return the character code of character whose multibyte form is at
- P. Note that this macro unifies CJK characters whose codepoints
- are in the Private Use Areas (PUAs), so it might return a different
- codepoint from the one actually stored at P. */
+/* Return the character code of character whose multibyte form is at P. */
#define STRING_CHAR(p) \
(!((p)[0] & 0x80) \
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs-25 2b8c5f0: Update commentary of STRING_CHAR and FETCH_MULTIBYTE_CHAR,
Eli Zaretskii <=