\f
* Incompatible Lisp Changes in Emacs 27.1
+---
+** Incomplete destructive splicing support has been removed.
+Support for Common Lisp style destructive splicing (",.") was
+incomplete and broken for a long time. It has now been removed.
+
+This means that backquote substitution now works for identifiers
+starting with a period ("."). Consider the following example:
+
+ (let ((.foo 42)) `,.foo)
+
+In the past, this would have incorrectly evaluated to '(\,\. foo)',
+but will now instead evaluate to '42'.
+
---
** The REGEXP in 'magic-mode-alist' is now matched case-sensitively.
Likewise for 'magic-fallback-mode-alist'.
if (ch == '@')
comma_type = Qcomma_at;
- else if (ch == '.')
- comma_type = Qcomma_dot;
else
{
if (ch >= 0) UNREAD (ch);
DEFSYM (Qbackquote, "`");
DEFSYM (Qcomma, ",");
DEFSYM (Qcomma_at, ",@");
- DEFSYM (Qcomma_dot, ",.");
DEFSYM (Qinhibit_file_name_operation, "inhibit-file-name-operation");
DEFSYM (Qascii_character, "ascii-character");
else if (print_quoted && CONSP (XCDR (obj)) && NILP (XCDR (XCDR (obj)))
&& new_backquote_output
&& (EQ (XCAR (obj), Qcomma)
- || EQ (XCAR (obj), Qcomma_at)
- || EQ (XCAR (obj), Qcomma_dot)))
+ || EQ (XCAR (obj), Qcomma_at)))
{
print_object (XCAR (obj), printcharfun, false);
new_backquote_output--;
"Remove the Lisp reference to the byte-compiled object."
(setf (symbol-function #'eval-tests-33014-func) nil))
+(defun eval-tests-19790-backquote-comma-dot-substitution ()
+ "Regression test for Bug#19790.
+Don't handle destructive splicing in backquote expressions (like
+in Common Lisp). Instead, make sure substitution in backquote
+expressions works for identifiers starting with period."
+ (should (equal (let ((.x 'identity)) (eval `(,.x 'ok))) 'ok)))
+
;;; eval-tests.el ends here