From: Lars Ingebrigtsen Date: Fri, 23 Aug 2019 04:20:41 +0000 (+0200) Subject: Give a better error message when reading invalid "\unicode" escapes. X-Git-Tag: emacs-27.0.90~1328^2~116 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=fbbc257190d115dc76e1a8cf4e4992d52d7f55b9;p=emacs.git Give a better error message when reading invalid "\unicode" escapes. * src/lread.c (read_escape): Give a clearer error message on Unicode escape sequences (bug#36988). --- diff --git a/src/lread.c b/src/lread.c index e444830c99a..6ae7a0d8ba0 100644 --- a/src/lread.c +++ b/src/lread.c @@ -2585,7 +2585,8 @@ read_escape (Lisp_Object readcharfun, bool stringp) want. */ int digit = char_hexdigit (c); if (digit < 0) - error ("Non-hex digit used for Unicode escape"); + error ("Non-hex character used for Unicode escape: %c (%d)", + c, c); i = (i << 4) + digit; } if (i > 0x10FFFF)