Code Monkey home page Code Monkey logo

Comments (5)

ejmr avatar ejmr commented on August 16, 2024

Thanks for finding this and especially for posting a work-around. A cleaner version I think would be to check for the existence of cl-lib, i.e. does the user have Emacs 24.3, and if not fall back on cl. But I am exhausted and about to go sleep so I will write a patch to correct this tomorrow. I really don't understand why Emacs has made these changes to cl and flet and such, but now's not the time or place to get into a rant...

from php-mode.

ryuslash avatar ryuslash commented on August 16, 2024

How about:

(unless (require 'cl-lib nil t)
  (require 'cl))

As far as I know they made the changes to keep the namespace pure. Now they don't (shouldn't?) have to warn about the run-time use of these functions/macros.

from php-mode.

ejmr avatar ejmr commented on August 16, 2024

Whaddya know, can't sleep, so still up programming, heh.

Great idea @ryuslash . @targzeta , would you mind trying out the code @ryuslash posted to see if that clears up all of the related byte-compiler warnings for you? If so I will add that as a patch, giving @ryuslash authorship credit of course.

from php-mode.

targzeta avatar targzeta commented on August 16, 2024

yes,
the @ryuslash's patch works fine.

--- /tmp/php-mode.el    2012-12-20 10:08:43.000000000 +0100
+++ php-mode.el 2012-12-20 15:05:41.801574000 +0100
@@ -67,7 +67,8 @@
 (require 'custom)
 (require 'flymake)
 (eval-when-compile
-  (require 'cl-lib)
+  (unless (require 'cl-lib nil t)
+  (require 'cl))
   (require 'regexp-opt)
   (defvar c-vsemi-status-unknown-p)
   (defvar syntax-propertize-via-font-lock))

but, is safely to fall back on cl? However, you can patch php-mode and close this issue.

Thanks a lot,
Emanuele

from php-mode.

ejmr avatar ejmr commented on August 16, 2024

The patch by @ryuslash is now in the master branch.

...but, is safely to fall back on cl?

Yes, I believe it is. Since php-mode makes use of some code from the cl(-lib) package, and because that package is changing in the latest version of Emacs, I believe this fallback approach is most appropriate. Not everyone will upgrade their version of Emacs right away, so they will continue to get warnings without something like this. And I prefer to treat warnings like errors.

Again, thanks to both of you.

from php-mode.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.