emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Noisy byte compilation on master


From: Stefan Monnier
Subject: Re: Noisy byte compilation on master
Date: Sun, 15 Feb 2015 21:56:29 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

> Well, it just occured to me that it's not that terribly useful to have
> it in ELPA, as you need that macro during byte-compilation, and ELPA
> packages are not available from 'emacs -Q'. So I guess I'll have to
> install in CEDET upstream.

Of course you could compile with an "emacs -Q --eval '(package-initialize)'"
or something like that, but if you prefer to bundle cl-generic.el that's
OK as well.

> The bigger problem is that now I get a ton of warnings during CEDET
> compilation because you use 'labels' instead of 'cl-labels', but with
> good reason, as the commentary says. Not sure what to do about that...

Try the 100% untested patch below, which should silence those warnings.

> The alternative would be that built-in ELPA thingy, but that's not
> available yet.

I really hope we can get this "bundle some ELPA packages in the tarball"
working for 25.1.

> Also, if I understand you correctly, this would mean that
> core packages cannot depend on CEDET.

Indeed, that'd be the downside.

> However, the advantage would be that I could ditch a beloved pet-peeve
> of mine, namely editing that file that shall not be named (hint: it
> logs changes).

The ChangeLog should disappear from master "any time now", so this
should be resolved in any case soonish.


        Stefan


diff --git a/packages/cl-generic/cl-generic.el 
b/packages/cl-generic/cl-generic.el
index df09449..8aa87f1 100644
--- a/packages/cl-generic/cl-generic.el
+++ b/packages/cl-generic/cl-generic.el
@@ -101,15 +101,15 @@
            ;; We could just alias `cl-call-next-method' to `call-next-method',
            ;; and that would work, but then files compiled with this cl-generic
            ;; wouldn't work in Emacs-25 any more.
-           ;; Also we use `labels' rather than one of cl-lib's macros, so as to
-           ;; be compatible with older emacsen (and ELPA's cl-lib emulation
-           ;; doesn't provide cl-flet and provides an incomplete cl-labels).
+           ;; Also we fallback on `labels' if `cl-flet' is not available
+           ;; (ELPA's cl-lib emulation doesn't provide cl-flet).
            ,@(if qualifiers
                  ;; Must be :before or :after, so can't call next-method.
                  body
-               `((labels ((cl-call-next-method (&rest args)
-                                               (apply #'call-next-method args))
-                          (cl-next-method-p () (next-method-p)))
+               `((,(if (fboundp 'cl-flet) 'cl-flet 'labels)
+                      ((cl-call-next-method (&rest args)
+                                            (apply #'call-next-method args))
+                       (cl-next-method-p () (next-method-p)))
                    ,@body))))))))
 
 (provide 'cl-generic)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]