diff options
author | Philipp Stephani <phst@google.com> | 2018-06-02 11:59:02 +0200 |
---|---|---|
committer | Philipp Stephani <phst@google.com> | 2019-04-19 19:19:35 +0200 |
commit | 0b4b380ce4989afc59848d2b6a350bd1dd7dc7ca (patch) | |
tree | d48cd46b86ff19c609dd16f7ef799dd720014ef3 /test/lisp | |
parent | 8aadf6e415b7801cb9fa4c5670b1750da207cf87 (diff) | |
download | emacs-0b4b380ce4989afc59848d2b6a350bd1dd7dc7ca.tar.gz |
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.
Diffstat (limited to 'test/lisp')
-rw-r--r-- | test/lisp/emacs-lisp/bytecomp-tests.el | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/test/lisp/emacs-lisp/bytecomp-tests.el b/test/lisp/emacs-lisp/bytecomp-tests.el index f66a06bc1bc..5fb64ff2881 100644 --- a/test/lisp/emacs-lisp/bytecomp-tests.el +++ b/test/lisp/emacs-lisp/bytecomp-tests.el @@ -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." |