emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debbugs-tracker] bug#19790: closed ([PATCH] destructive splicing in bac


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#19790: closed ([PATCH] destructive splicing in backquote)
Date: Thu, 26 Sep 2019 16:39:01 +0000

Your message dated Thu, 26 Sep 2019 18:38:09 +0200
with message-id <address@hidden>
and subject line Re: bug#19790: [PATCH] destructive splicing in backquote
has caused the debbugs.gnu.org bug report #19790,
regarding [PATCH] destructive splicing in backquote
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden.)


-- 
19790: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=19790
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: [PATCH] destructive splicing in backquote Date: Fri, 06 Feb 2015 01:39:02 -0500 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)
Common Lisp and MACLISP define comma-dot syntax for destructive splicing
in backquote expressions. The Elisp reader reads ",.x" as "(\,\. x)"
(like ",@"), but the resulting forms are not processed by the backquote
library. A patch follows that adds CL-compatible comma-dot support.

Originally reported by at Artur Malabarba in
<http://lists.gnu.org/archive/html/emacs-devel/2015-01/msg00624.html>.

-- >8 --
Subject: [PATCH] destructive splicing in backquote

Allow Common Lisp-compatible destructive splicing in backquote
expressions using ",." syntax.

* lisp/emacs-lisp/backquote.el (backquote-destructive-splice-symbol):
  New variable.
  (backquote-process): Allow backquote-destructive-splice-symbol as a
  synonym for backquote-splice-symbol.
---
 lisp/ChangeLog               | 7 +++++++
 lisp/emacs-lisp/backquote.el | 6 +++++-
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index c18a8ff..fd643ed 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,10 @@
+2015-02-06  Robin Templeton  <address@hidden>
+
+       * emacs-lisp/backquote.el (backquote-destructive-splice-symbol):
+       New variable.
+       (backquote-process): Allow backquote-destructive-splice-symbol as
+       a synonym for backquote-splice-symbol.
+
 2015-02-03  Artur Malabarba  <address@hidden>
 
        * emacs-lisp/package.el (package-delete): Document NOSAVE.
diff --git a/lisp/emacs-lisp/backquote.el b/lisp/emacs-lisp/backquote.el
index d5cdca2..b6e1792 100644
--- a/lisp/emacs-lisp/backquote.el
+++ b/lisp/emacs-lisp/backquote.el
@@ -90,6 +90,9 @@ For example (backquote-list* 'a 'b 'c) => (a b . c)"
 (defconst backquote-splice-symbol '\,@
   "Symbol used to represent a splice inside a backquote.")
 
+(defconst backquote-destructive-splice-symbol '\,.
+  "Symbol used to represent a destructive splice inside a backquote.")
+
 (defmacro backquote (structure)
   "Argument STRUCTURE describes a template to build.
 
@@ -160,7 +163,8 @@ LEVEL is only used internally and indicates the nesting 
level:
          (t (cons (if (eq (car-safe (nth 1 s)) 'quote) 0 1)
                   (nth 1 s))))
       (backquote-delay-process s (1- level))))
-   ((eq (car s) backquote-splice-symbol)
+   ((or (eq (car s) backquote-splice-symbol)
+        (eq (car s) backquote-destructive-splice-symbol))
     (if (<= level 0)
         (if (> (length s) 2)
             ;; (cons 2 `(append . ,(cdr s)))
-- 
2.1.4





--- End Message ---
--- Begin Message --- Subject: Re: bug#19790: [PATCH] destructive splicing in backquote Date: Thu, 26 Sep 2019 18:38:09 +0200
Stefan Kangas <address@hidden> writes:

> Stefan Monnier <address@hidden> writes:
>
> > LGTM.
>
> Thanks.  If there are no further comments, I'll commit the attached in
> a few days.

No more comments in 11 days, so I've now pushed this to master as
commit 3cf8f9b1ec.  I'm consequently closing this bug.

Best regards,
Stefan Kangas


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]