diff options
| author | Philipp Stephani | 2017-10-03 16:14:54 +0200 |
|---|---|---|
| committer | Philipp Stephani | 2017-12-09 21:24:05 +0100 |
| commit | 8b8197235f058276823832eadce66e2de2f9a9cf (patch) | |
| tree | cc1056b104b6a4835d243e1ca22776e083213018 /test/src | |
| parent | 6fc0397388c9e03a631806667570959a49b49763 (diff) | |
| download | emacs-8b8197235f058276823832eadce66e2de2f9a9cf.tar.gz emacs-8b8197235f058276823832eadce66e2de2f9a9cf.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/src')
| -rw-r--r-- | test/src/lread-tests.el | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/src/lread-tests.el b/test/src/lread-tests.el index ac730b4f005..3f41982eba1 100644 --- a/test/src/lread-tests.el +++ b/test/src/lread-tests.el | |||
| @@ -173,13 +173,13 @@ literals (Bug#20852)." | |||
| 173 | (should (string-suffix-p "/somelib.el" (caar load-history))))) | 173 | (should (string-suffix-p "/somelib.el" (caar load-history))))) |
| 174 | 174 | ||
| 175 | (ert-deftest lread-tests--old-style-backquotes () | 175 | (ert-deftest lread-tests--old-style-backquotes () |
| 176 | "Check that loading warns about old-style backquotes." | 176 | "Check that loading doesn't accept old-style backquotes." |
| 177 | (lread-tests--with-temp-file file-name | 177 | (lread-tests--with-temp-file file-name |
| 178 | (write-region "(` (a b))" nil file-name) | 178 | (write-region "(` (a b))" nil file-name) |
| 179 | (should (equal (load file-name nil :nomessage :nosuffix) t)) | 179 | (let ((data (should-error (load file-name nil :nomessage :nosuffix)))) |
| 180 | (should (equal (lread-tests--last-message) | 180 | (should (equal (cdr data) |
| 181 | (concat (format-message "Loading `%s': " file-name) | 181 | (list (concat (format-message "Loading `%s': " file-name) |
| 182 | "old-style backquotes detected!"))))) | 182 | "old-style backquotes detected!"))))))) |
| 183 | 183 | ||
| 184 | (ert-deftest lread-lread--substitute-object-in-subtree () | 184 | (ert-deftest lread-lread--substitute-object-in-subtree () |
| 185 | (let ((x (cons 0 1))) | 185 | (let ((x (cons 0 1))) |