Eli Zaretskii schrieb am Fr., 29. Dez. 2017 um 21:27 Uhr: > > From: Philipp Stephani > > Date: Fri, 29 Dec 2017 20:14:41 +0000 > > Cc: alan@idiocy.org, phst@google.com, emacs-devel@gnu.org > > > > diff --git a/src/coding.c b/src/coding.c > > index 1705838ffa..9903d87b92 100644 > > --- a/src/coding.c > > +++ b/src/coding.c > > @@ -1515,13 +1515,6 @@ encode_coding_utf_8 (struct coding_system *coding) > > /* See the above "GENERAL NOTES on `detect_coding_XXX ()' functions". > > Return true if a text is encoded in one of UTF-16 based coding > systems. */ > > > > -#define UTF_16_HIGH_SURROGATE_P(val) \ > > - (((val) & 0xFC00) == 0xD800) > > - > > -#define UTF_16_LOW_SURROGATE_P(val) \ > > - (((val) & 0xFC00) == 0xDC00) > > - > > - > > static bool > > detect_coding_utf_16 (struct coding_system *coding, > > struct coding_detection_info *detect_info) > > @@ -1686,7 +1679,7 @@ decode_coding_utf_16 (struct coding_system > *coding) > > > > if (surrogate) > > { > > - if (! UTF_16_LOW_SURROGATE_P (c)) > > + if (! char_low_surrogate_p (c)) > > Please don't. This makes decoding UTF-16 a tad slower for no good > reason (more than a tad in unoptimized builds). > > OK, here's a new version of the patch.