diff options
| author | Philipp Stephani | 2017-12-29 21:50:55 +0100 |
|---|---|---|
| committer | Philipp Stephani | 2018-01-07 14:16:02 +0100 |
| commit | ddb74b2027802ab4416bd8cdb1757a209dd7a63b (patch) | |
| tree | 938556910293db86bd2b074bba9a292339f6ce70 /test/src | |
| parent | 610dad1102cba5fa6111050d30c734b51bcdb77d (diff) | |
| download | emacs-ddb74b2027802ab4416bd8cdb1757a209dd7a63b.tar.gz emacs-ddb74b2027802ab4416bd8cdb1757a209dd7a63b.zip | |
Add new variable to force new-style backquote interpretation.
* src/lread.c (syms_of_lread): Add new variable
'force-new-style-backquotes'.
(read_internal_start): Use it.
* test/src/lread-tests.el (lread-tests--force-new-style-backquotes):
New test.
* etc/NEWS: Document new variable.
Diffstat (limited to 'test/src')
| -rw-r--r-- | test/src/lread-tests.el | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/src/lread-tests.el b/test/src/lread-tests.el index e2d4eaa63c7..693c6c09bf3 100644 --- a/test/src/lread-tests.el +++ b/test/src/lread-tests.el | |||
| @@ -181,6 +181,14 @@ literals (Bug#20852)." | |||
| 181 | (list (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-tests--force-new-style-backquotes () | ||
| 185 | (let ((data (should-error (read "(` (a b))")))) | ||
| 186 | (should (equal (cdr data) | ||
| 187 | '("Loading `nil': old-style backquotes detected!")))) | ||
| 188 | (should (equal (let ((force-new-style-backquotes t)) | ||
| 189 | (read "(` (a b))")) | ||
| 190 | '(`(a b))))) | ||
| 191 | |||
| 184 | (ert-deftest lread-lread--substitute-object-in-subtree () | 192 | (ert-deftest lread-lread--substitute-object-in-subtree () |
| 185 | (let ((x (cons 0 1))) | 193 | (let ((x (cons 0 1))) |
| 186 | (setcar x x) | 194 | (setcar x x) |