diff options
author | Philipp Stephani <phst@google.com> | 2017-10-03 16:14:54 +0200 |
---|---|---|
committer | Philipp Stephani <phst@google.com> | 2017-10-08 18:52:37 +0200 |
commit | 9613690f6e51e2f2aa2bcbbede3e209d08cfaaad (patch) | |
tree | 27bd9ddc57a7ae5ba7361d246b4bfec8f4aad043 /test/lisp/emacs-lisp | |
parent | f4995e7d36b576d9ed629b45dd3b09ba6d28cce7 (diff) | |
download | emacs-9613690f6e51e2f2aa2bcbbede3e209d08cfaaad.tar.gz emacs-9613690f6e51e2f2aa2bcbbede3e209d08cfaaad.tar.bz2 emacs-9613690f6e51e2f2aa2bcbbede3e209d08cfaaad.zip |
Raise an error when detecting old-style backquotes.
They have been deprecated for a decade now.
* src/lread.c (Fload): Don't use record_unwind_protect to warn about
old-style backquotes any more. They now generate a hard error.
(read1): Signal an error when detecting old-style backquotes. Remove
unused label.
(syms_of_lread): Remove unused internal variable
'lread--old-style-backquotes'.
(load_error_old_style_backquotes): Rename from
'load_warn_oldstyle_backquotes'. Signal an error.
* lisp/emacs-lisp/bytecomp.el (byte-compile-from-buffer): Remove check
from byte compiler. It isn't triggered any more.
* test/src/lread-tests.el (lread-tests--old-style-backquotes): Adapt
unit test.
* test/lisp/emacs-lisp/bytecomp-tests.el
(bytecomp-tests--old-style-backquotes)
(bytecomp-tests-function-put): Adapt unit tests.
* etc/NEWS: Document change.
Diffstat (limited to 'test/lisp/emacs-lisp')
-rw-r--r-- | test/lisp/emacs-lisp/bytecomp-tests.el | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/test/lisp/emacs-lisp/bytecomp-tests.el b/test/lisp/emacs-lisp/bytecomp-tests.el index 30d2a4753cf..1f85c269780 100644 --- a/test/lisp/emacs-lisp/bytecomp-tests.el +++ b/test/lisp/emacs-lisp/bytecomp-tests.el @@ -534,23 +534,18 @@ literals (Bug#20852)." (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)))) + (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."))))))) + '("Loading `nil': old-style backquotes detected!"))))))) (ert-deftest bytecomp-tests-function-put () "Check `function-put' operates during compilation." - (should (boundp 'lread--old-style-backquotes)) (bytecomp-tests--with-temp-file source (dolist (form '((function-put 'bytecomp-tests--foo 'foo 1) (function-put 'bytecomp-tests--foo 'bar 2) |