Page 1 of 1

Old-style backquotes -- not?

Posted: Fri Oct 17, 2008 2:56 am
by Etrigan
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.

Re: Old-style backquotes -- not?

Posted: Sun Sep 20, 2009 3:58 pm
by S11001001
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.