all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* nested backquotes
@ 2005-05-18 15:13 Matthieu Moy
  2005-05-18 15:50 ` rgb
  0 siblings, 1 reply; 12+ messages in thread
From: Matthieu Moy @ 2005-05-18 15:13 UTC (permalink / raw)


Hi,

I'm experiencing problems with nested backquotes in Emacs lisp:

Emacs 21 says:

ELISP> ``( ,,(+ 1 2))
(cons
 (+ 1 2))

Whereas XEmacs says:
ELISP> ``( ,,(+ 1 2))
(list 3)

Question 1: Who is right? (I'd say XEmacs here. I don't understand
Emacs's behavior)

Question 2: Is there a portable way to use nested backquotes in Emacs
Lisp?

Thanks,

-- 
Matthieu

^ permalink raw reply	[flat|nested] 12+ messages in thread
* nested backquotes
@ 2003-09-24 14:03 Carlos Ungil
  2003-09-24 14:22 ` Carlos Ungil
  0 siblings, 1 reply; 12+ messages in thread
From: Carlos Ungil @ 2003-09-24 14:03 UTC (permalink / raw)


Hello,

I've found (what I think it is) a bug when using nested backquotes.

What follows has been executed using "emacs --no-init".
I understand that the first test is giving the right result, and that 
in the other cases there is a problem with the backquotes.

Maybe the reason it works in windows is because I'm 
using a more recent version (21.3.50, compared to 21.2.1 in linux 
and solaris), and the bug has indeed been fixed already, but I've 
found no references to this bug in emacs newsgroups, or in the 
PROBLEMS file (and the file backquote.el has not been changed, but 
maybe the origin of the bug was somewhere else).

Regards,

Carlos Ungil

-----

(emacs-version)
=>"GNU Emacs 21.3.50.1 (i386-mingw-nt5.1.2600) of 2003-08-21 on MIDASPSE17"

(defmacro test ()
  ``(a ,b ,,c))
=>test

(let ((a 1) (b 2) (c 3))
  (macroexpand (macroexpand '(test))))
=>(list (quote a) b 3)

-----

(emacs-version)
=>"GNU Emacs 21.2.1 (sparc-sun-solaris2.9, X toolkit, Xaw3d scroll bars) of 2003-05-19 on watford-71"

(defmacro test ()
  ``(a ,b ,,c))
=>test

(let ((a 1) (b 2) (c 3))
  (macroexpand (macroexpand '(test))))
=>(list (quote a) b \,c)

-----

(emacs-version)
=>"GNU Emacs 21.2.1 (i386-redhat-linux-gnu, X toolkit, Xaw3d scroll bars) of 2002-04-09 on porky.devel.redhat.com"

(defmacro test ()
  ``(a ,b ,,c))
=>test

(let ((a 1) (b 2) (c 3))
  (macroexpand (macroexpand '(test))))
=>(list (quote a) b \,c)

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2005-05-21 10:02 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-18 15:13 nested backquotes Matthieu Moy
2005-05-18 15:50 ` rgb
2005-05-18 16:19   ` Matthieu Moy
2005-05-18 18:21     ` Thierry Emery
2005-05-20 15:16     ` Stefan Monnier
2005-05-20 15:24     ` Stefan Monnier
2005-05-20 16:05       ` Matthieu Moy
2005-05-20 20:25         ` Stefan Monnier
2005-05-21  9:51           ` Matthieu Moy
2005-05-21 10:02             ` Matthieu Moy
  -- strict thread matches above, loose matches on Subject: below --
2003-09-24 14:03 Carlos Ungil
2003-09-24 14:22 ` Carlos Ungil

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.