diff options
| author | Noam Postavsky | 2018-03-10 18:20:45 -0500 |
|---|---|---|
| committer | Noam Postavsky | 2019-11-28 18:03:42 -0500 |
| commit | 85f586f3ce5c6d9598d345440fd57e0fc9b8d98b (patch) | |
| tree | 10723ac9f3d20dc4a4bb045b1e58c02234a9c9e5 /test/src | |
| parent | 98f8c5fb07dcb4e20b8ba6648bdabf5c0d3b5145 (diff) | |
| download | emacs-85f586f3ce5c6d9598d345440fd57e0fc9b8d98b.tar.gz emacs-85f586f3ce5c6d9598d345440fd57e0fc9b8d98b.zip | |
Stop signaling an error when reading "smart quotes" in symbols
Revert commits from 2018-01-28 "Fix round tripping of read->print for
symbols with strange quotes", and 2017-07-22 "Signal error for symbol
names with strange quotes (Bug#2967)".
* etc/NEWS: Remove corresponding entries.
* src/character.c (confusable_symbol_character_p):
* test/src/lread-tests.el (lread-tests--old-style-backquotes): Remove.
* src/lread.c (read1): Don't signal error on confusable character.
* src/print.c (print_object): Don't escape confusable characters.
Diffstat (limited to 'test/src')
| -rw-r--r-- | test/src/lread-tests.el | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/test/src/lread-tests.el b/test/src/lread-tests.el index 3a2212ef770..0c14a1afdaa 100644 --- a/test/src/lread-tests.el +++ b/test/src/lread-tests.el | |||
| @@ -144,23 +144,6 @@ literals (Bug#20852)." | |||
| 144 | "`?\\\"', `?\\(', `?\\)', `?\\;', `?\\[', `?\\]' " | 144 | "`?\\\"', `?\\(', `?\\)', `?\\;', `?\\[', `?\\]' " |
| 145 | "expected!"))))) | 145 | "expected!"))))) |
| 146 | 146 | ||
| 147 | (ert-deftest lread-tests--funny-quote-symbols () | ||
| 148 | "Check that `smart quotes' or similar trigger errors in symbol names." | ||
| 149 | (dolist (quote-char | ||
| 150 | '(#x2018 ;; LEFT SINGLE QUOTATION MARK | ||
| 151 | #x2019 ;; RIGHT SINGLE QUOTATION MARK | ||
| 152 | #x201B ;; SINGLE HIGH-REVERSED-9 QUOTATION MARK | ||
| 153 | #x201C ;; LEFT DOUBLE QUOTATION MARK | ||
| 154 | #x201D ;; RIGHT DOUBLE QUOTATION MARK | ||
| 155 | #x201F ;; DOUBLE HIGH-REVERSED-9 QUOTATION MARK | ||
| 156 | #x301E ;; DOUBLE PRIME QUOTATION MARK | ||
| 157 | #xFF02 ;; FULLWIDTH QUOTATION MARK | ||
| 158 | #xFF07 ;; FULLWIDTH APOSTROPHE | ||
| 159 | )) | ||
| 160 | (let ((str (format "%cfoo" quote-char))) | ||
| 161 | (should-error (read str) :type 'invalid-read-syntax) | ||
| 162 | (should (eq (read (concat "\\" str)) (intern str)))))) | ||
| 163 | |||
| 164 | (ert-deftest lread-test-bug26837 () | 147 | (ert-deftest lread-test-bug26837 () |
| 165 | "Test for https://debbugs.gnu.org/26837 ." | 148 | "Test for https://debbugs.gnu.org/26837 ." |
| 166 | (let ((load-path (cons | 149 | (let ((load-path (cons |