Subject: bug#36068: 27.0.50; Warning: unescaped character literals `?)' detected, `?\)' expected!

From: [email-masked]
Date: Mon, 03 Jun 2019 13:14:05 -0400

Andreas Schwab <[email-masked]> writes:

> On Jun 03 2019, Eli Zaretskii <[email-masked]> wrote:
>
>>> From: [email-masked]

>>> Ah, I think the problem can be triggered any time you `read' an unescaped
>>> literal outside of `load'.  E.g., from emacs -Q:

>>>     M-: ?) RET
>>> 
>>> Now any byte-compilation will report unescaped `?)'.
>>
>> Maybe we should forcefully set it to nil at top level?
>
> But how can load_warn_unescaped_character_literals be called while
> lread--unescaped-character-literals is not let-bound?

It's not.  byte-run--unescaped-character-literals-warning is called from
the byte compiler.  So maybe just let-binding
lread--unescaped-character-literals in byte-compile-from-buffer should
be enough.