diff options
author | Philipp <phst@google.com> | 2017-05-06 22:23:03 +0200 |
---|---|---|
committer | Philipp Stephani <phst@google.com> | 2017-05-13 12:32:29 +0200 |
commit | a1d461592172ca4c8aac0e4e923ef5e909cfb361 (patch) | |
tree | 7d972dbecad74eab4f7dfb37969ab0170c2870e1 /test/lisp/emacs-lisp/bytecomp-tests.el | |
parent | 16004397f40d15d9db6b90632c236c804f38fc40 (diff) | |
download | emacs-a1d461592172ca4c8aac0e4e923ef5e909cfb361.tar.gz emacs-a1d461592172ca4c8aac0e4e923ef5e909cfb361.tar.bz2 emacs-a1d461592172ca4c8aac0e4e923ef5e909cfb361.zip |
Make `old-style-backquotes' variable internal
* src/lread.c (load_warn_old_style_backquotes, Fload, read1)
(syms_of_lread): Rename `old-style-backquotes' to
`lread--old-style-backquotes', and clarify that it's for internal
use only.
* lisp/emacs-lisp/bytecomp.el (byte-compile-from-buffer): Rename
variable.
* test/src/lread-tests.el (lread-tests--old-style-backquotes): Add
unit test.
* emacs-lisp/bytecomp-tests.el
(bytecomp-tests--old-style-backquotes): Add unit test.
Diffstat (limited to 'test/lisp/emacs-lisp/bytecomp-tests.el')
-rw-r--r-- | test/lisp/emacs-lisp/bytecomp-tests.el | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/lisp/emacs-lisp/bytecomp-tests.el b/test/lisp/emacs-lisp/bytecomp-tests.el index 84004a9264a..d15bd8b6e65 100644 --- a/test/lisp/emacs-lisp/bytecomp-tests.el +++ b/test/lisp/emacs-lisp/bytecomp-tests.el @@ -530,6 +530,21 @@ literals (Bug#20852)." "`?\"', `?(', `?)', `?;', `?[', `?]' " "detected!")))))))) +(ert-deftest bytecomp-tests--old-style-backquotes () + "Check that byte compiling warns about old-style backquotes." + (should (boundp 'lread--old-style-backquotes)) + (bytecomp-tests--with-temp-file source + (write-region "(` (a b))" nil source) + (bytecomp-tests--with-temp-file destination + (let* ((byte-compile-dest-file-function (lambda (_) destination)) + (byte-compile-error-on-warn t) + (byte-compile-debug t) + (err (should-error (byte-compile-file source)))) + (should (equal (cdr err) + (list "!! The file uses old-style backquotes !! +This functionality has been obsolete for more than 10 years already +and will be removed soon. See (elisp)Backquote in the manual."))))))) + ;; Local Variables: ;; no-byte-compile: t ;; End: |