This is a read-only archive of lispforum.com. The forum was locked to new users and posts and is preserved here as static HTML from a database snapshot taken on 2019-09-07.

Old-style backquotes -- not?

2 posts · 3802 views

I've written a generator for a suite of conditional-compilation macros for platform-specific elisp, like:
(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?
(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?

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.