Subject: bug#10299: Emacs doesn't handle Unicode characters in keyboard layout on MS Windows

From: Andreas Schwab <[email-masked]>
Date: Tue, 24 Jan 2012 10:40:52 +0100

Stefan Monnier <[email-masked]> writes:

>> +      if (os_subtype == OS_NT)
>> +        result = GetMessageW (&msg, NULL, 0, 0);
>> +      else
>> +        result = GetMessage (&msg, NULL, 0, 0);
>
> I'd write it as follows:
>
>   result = (os_subtype == OS_NT ? GetMessageW : GetMessage) (&msg, NULL, 0, 0);

That can fail if either of the functions is defined only as a
function-like macro.

Andreas.

-- 
Andreas Schwab, [email-masked]
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."