Make warning about unescaped character literals more helpful.
See Bug#31676. * lisp/emacs-lisp/byte-run.el (byte-run--unescaped-character-literals-warning): New defun. * src/lread.c (load_warn_unescaped_character_literals): Use new defun. (syms_of_lread): Define symbol for new defun. * lisp/emacs-lisp/bytecomp.el (byte-compile-from-buffer): Use new defun. * 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:
parent
8aadf6e415
commit
0b4b380ce4
5 changed files with 33 additions and 25 deletions
|
@ -540,7 +540,9 @@ literals (Bug#20852)."
|
|||
(should (equal (cdr err)
|
||||
(list (concat "unescaped character literals "
|
||||
"`?\"', `?(', `?)', `?;', `?[', `?]' "
|
||||
"detected!"))))))))
|
||||
"detected, "
|
||||
"`?\\\"', `?\\(', `?\\)', `?\\;', `?\\[', "
|
||||
"`?\\]' expected!"))))))))
|
||||
|
||||
(ert-deftest bytecomp-tests--old-style-backquotes ()
|
||||
"Check that byte compiling warns about old-style backquotes."
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue