Improve unescaped character literal warnings

* src/lread.c (load_warn_unescaped_character_literals)
(syms_of_lread):
lisp/emacs-lisp/bytecomp.el (byte-compile-from-buffer): Improve
formatting of unescaped character literal warnings.

* test/src/lread-tests.el (lread-tests--unescaped-char-literals):
test/lisp/emacs-lisp/bytecomp-tests.el
(bytecomp-tests--unescaped-char-literals): Adapt unit tests.
This commit is contained in:
Philipp Stephani 2017-05-13 12:28:48 +02:00
parent 0e09d00f29
commit 16004397f4
4 changed files with 9 additions and 4 deletions

View file

@ -2032,7 +2032,7 @@ and will be removed soon. See (elisp)Backquote in the manual."))
(when lread--unescaped-character-literals
(byte-compile-warn
"unescaped character literals %s detected!"
(mapconcat #'string
(mapconcat (lambda (char) (format "`?%c'" char))
(sort lread--unescaped-character-literals #'<)
", ")))
(byte-compile-toplevel-file-form form)))