Old-style backquotes -- not?

Discussion of Emacs Lisp
Post Reply
Etrigan
Posts: 3
Joined: Mon Jul 07, 2008 8:18 am

Old-style backquotes -- not?

Post by Etrigan » Fri Oct 17, 2008 2:56 am

I've written a generator for a suite of conditional-compilation macros for platform-specific elisp, like:

Code: Select all

(compile-on-gnu/linux (&rest forms))
(compile-on-darwin (&rest forms))
and so on.

The emacs 22.2 byte-compiler warns that this generator code (below) contains old-style backquotes. But AFAICT, the code does not contain old-style backquotes etc. at all.

Emacs 22.1 makes no complaint.

The code compiles and runs OK in both emacs versions, but the warning message is annoying.

Can anyone see any old-style backquote stuff here? Is the problem that there is a nested backquote?

Code: Select all

(dolist (os '(darwin gnu/linux cygwin))
  (let ((os-name (symbol-name os)))
    (eval
     `(defmacro ,(intern (concat "compile-on-" os-name)) (&rest forms)
        ,(concat "Conditionally compiles FORMS only on " os-name ".")
        (when ,(eq system-type os) `(progn ,@forms))))))
As a follow-up, I always want to avoid calling 'eval' if I can. Can anyone see a way to do so here?

Cheers all.

S11001001
Posts: 5
Joined: Tue Sep 30, 2008 9:18 pm
Location: Indiana, USA
Contact:

Re: Old-style backquotes -- not?

Post by S11001001 » Sun Sep 20, 2009 3:58 pm

Etrigan wrote: The emacs 22.2 byte-compiler warns that this generator code (below) contains old-style backquotes. But AFAICT, the code does not contain old-style backquotes etc. at all.
Maybe it is wrong; I don't get a complaint on emacs-snapshot 20090320-1ubuntu1.
Etrigan wrote: As a follow-up, I always want to avoid calling 'eval' if I can. Can anyone see a way to do so here?
Define a macro and invoke it for each platform.

Post Reply