From: Diego Sevilla Ruiz <dsevilla@ditec.um.es>
To: emacs-devel@gnu.org
Subject: Error in nested backquoting
Date: Mon, 01 Jul 2013 00:45:49 +0200 [thread overview]
Message-ID: <51D0B51D.1080003@ditec.um.es> (raw)
[-- Attachment #1: Type: text/plain, Size: 956 bytes --]
Dear all:
I think I spotted an error in backquote.el answering this question in
stackoverflow:
http://stackoverflow.com/questions/17394638/nesting-backquote-and-in-emacs-lisp
In backquote expansion, the symbol for backquote (`) is treated specially
for nested backquoting, but its alias, backquote (if it is intended for it
to be used from elisp programs) is not correctly evaluated in nesting. The
patch (I think) is straightforward, and I include it as an attachment, but
you experts out there have to judge.
I would like to contribute it myself, but at the moment I'm not sure of
the steps I have to follow to do so (sign agreement? obtain write access to
repo?).
Best regards,
diego.
--
Diego Sevilla Ruiz -- http://ditec.um.es/~dsevilla/ -- dsevilla@um.es _.___
Dep. Ingeniería y Tecnología de Computadores, Facultad de Informática D|TEC
Univ.de Murcia,Campus Espinardo,30080 Murcia (SPAIN),Tel.+34868887571
[-- Attachment #2: patch --]
[-- Type: text/plain, Size: 901 bytes --]
--- backquote-old.el 2013-07-01 00:36:28.319352290 +0200
+++ backquote.el 2013-07-01 00:37:51.550816668 +0200
@@ -161,6 +161,8 @@
(backquote-delay-process s (1- level))))
((eq (car s) backquote-backquote-symbol)
(backquote-delay-process s (1+ level)))
+ ((eq (car s) 'backquote)
+ (backquote-delay-process s (1+ level)))
(t
(let ((rest s)
item firstlist list lists expression)
@@ -177,7 +179,8 @@
;; unquote since this needs to go recursively through
;; backquote-process.
(not (or (eq (car rest) backquote-unquote-symbol)
- (eq (car rest) backquote-backquote-symbol))))
+ (eq (car rest) backquote-backquote-symbol)
+ (eq (car rest) 'backquote))))
(setq item (backquote-process (car rest) level))
(cond
((= (car item) 2)
next reply other threads:[~2013-06-30 22:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-30 22:45 Diego Sevilla Ruiz [this message]
2013-07-01 7:53 ` Error in nested backquoting Andreas Schwab
2013-07-01 11:00 ` Diego Sevilla Ruiz
2013-07-01 11:54 ` Andreas Schwab
2013-07-01 12:51 ` Andreas Röhler
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=51D0B51D.1080003@ditec.um.es \
--to=dsevilla@ditec.um.es \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.