diff options
| author | Stefan Kangas | 2019-09-14 01:49:23 +0200 |
|---|---|---|
| committer | Stefan Kangas | 2019-09-26 18:37:23 +0200 |
| commit | 3cf8f9b1ec1a079f6cd1a127259414dcb0cf8672 (patch) | |
| tree | 46fc8387c4646496157be34117ff7a904338f1df /src | |
| parent | b94f01a6165908d9f8b0d48653fdc8d75be4dd08 (diff) | |
| download | emacs-3cf8f9b1ec1a079f6cd1a127259414dcb0cf8672.tar.gz emacs-3cf8f9b1ec1a079f6cd1a127259414dcb0cf8672.zip | |
Remove support for destructive splicing in elisp
* src/lread.c (read1): Don't handle destructive splicing in
backquote expressions (e.g. ",.<identifier>"). (Bug#19790)
(syms_of_lread): Remove Qcomma_dot.
* src/print.c (print_object): Don't check for Qcomma_dot.
* test/src/eval-tests.el
(eval-tests-19790-backquote-comma-dot-substitution): New test.
* etc/NEWS: Announce it.
Diffstat (limited to 'src')
| -rw-r--r-- | src/lread.c | 3 | ||||
| -rw-r--r-- | src/print.c | 3 |
2 files changed, 1 insertions, 5 deletions
diff --git a/src/lread.c b/src/lread.c index 151731a81d9..5000b38a015 100644 --- a/src/lread.c +++ b/src/lread.c | |||
| @@ -3310,8 +3310,6 @@ read1 (Lisp_Object readcharfun, int *pch, bool first_in_list) | |||
| 3310 | 3310 | ||
| 3311 | if (ch == '@') | 3311 | if (ch == '@') |
| 3312 | comma_type = Qcomma_at; | 3312 | comma_type = Qcomma_at; |
| 3313 | else if (ch == '.') | ||
| 3314 | comma_type = Qcomma_dot; | ||
| 3315 | else | 3313 | else |
| 3316 | { | 3314 | { |
| 3317 | if (ch >= 0) UNREAD (ch); | 3315 | if (ch >= 0) UNREAD (ch); |
| @@ -5080,7 +5078,6 @@ this variable will become obsolete. */); | |||
| 5080 | DEFSYM (Qbackquote, "`"); | 5078 | DEFSYM (Qbackquote, "`"); |
| 5081 | DEFSYM (Qcomma, ","); | 5079 | DEFSYM (Qcomma, ","); |
| 5082 | DEFSYM (Qcomma_at, ",@"); | 5080 | DEFSYM (Qcomma_at, ",@"); |
| 5083 | DEFSYM (Qcomma_dot, ",."); | ||
| 5084 | 5081 | ||
| 5085 | DEFSYM (Qinhibit_file_name_operation, "inhibit-file-name-operation"); | 5082 | DEFSYM (Qinhibit_file_name_operation, "inhibit-file-name-operation"); |
| 5086 | DEFSYM (Qascii_character, "ascii-character"); | 5083 | DEFSYM (Qascii_character, "ascii-character"); |
diff --git a/src/print.c b/src/print.c index 7e5aed82877..77ddd93efba 100644 --- a/src/print.c +++ b/src/print.c | |||
| @@ -2076,8 +2076,7 @@ print_object (Lisp_Object obj, Lisp_Object printcharfun, bool escapeflag) | |||
| 2076 | else if (print_quoted && CONSP (XCDR (obj)) && NILP (XCDR (XCDR (obj))) | 2076 | else if (print_quoted && CONSP (XCDR (obj)) && NILP (XCDR (XCDR (obj))) |
| 2077 | && new_backquote_output | 2077 | && new_backquote_output |
| 2078 | && (EQ (XCAR (obj), Qcomma) | 2078 | && (EQ (XCAR (obj), Qcomma) |
| 2079 | || EQ (XCAR (obj), Qcomma_at) | 2079 | || EQ (XCAR (obj), Qcomma_at))) |
| 2080 | || EQ (XCAR (obj), Qcomma_dot))) | ||
| 2081 | { | 2080 | { |
| 2082 | print_object (XCAR (obj), printcharfun, false); | 2081 | print_object (XCAR (obj), printcharfun, false); |
| 2083 | new_backquote_output--; | 2082 | new_backquote_output--; |