summaryrefslogtreecommitdiff
path: root/test/src
diff options
context:
space:
mode:
authorPhilipp <phst@google.com>2017-05-06 22:23:03 +0200
committerPhilipp Stephani <phst@google.com>2017-05-13 12:32:29 +0200
commita1d461592172ca4c8aac0e4e923ef5e909cfb361 (patch)
tree7d972dbecad74eab4f7dfb37969ab0170c2870e1 /test/src
parent16004397f40d15d9db6b90632c236c804f38fc40 (diff)
downloademacs-a1d461592172ca4c8aac0e4e923ef5e909cfb361.tar.gz
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/src')
-rw-r--r--test/src/lread-tests.el9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/src/lread-tests.el b/test/src/lread-tests.el
index 685ea682e29..98cbb6a301d 100644
--- a/test/src/lread-tests.el
+++ b/test/src/lread-tests.el
@@ -155,4 +155,13 @@ literals (Bug#20852)."
(load "somelib" nil t)
(should (string-suffix-p "/somelib.el" (caar load-history)))))
+(ert-deftest lread-tests--old-style-backquotes ()
+ "Check that loading warns about old-style backquotes."
+ (lread-tests--with-temp-file file-name
+ (write-region "(` (a b))" nil file-name)
+ (should (equal (load file-name nil :nomessage :nosuffix) t))
+ (should (equal (lread-tests--last-message)
+ (concat (format-message "Loading `%s': " file-name)
+ "old-style backquotes detected!")))))
+
;;; lread-tests.el ends here