Comments (5)
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.
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.
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.
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.
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)
- (define-key map [tab] 'indent-for-tab-command) is a bug HOT 2
- Text inside Heredoc breaks indentation.
- Syntax highlighting for SQL strings HOT 2
- Please tag release (prerelease or beta is ok) for Emacs 28 compatibility HOT 1
- Error in ternary operator indentation HOT 1
- Unexpected syntax highlights after "new" in string HOT 1
- Automatic, overly-clever brace-matching is annoying and how to turn it off is non-obvious HOT 2
- Function faces HOT 1
- Commented out array elements break indentation HOT 2
- Drop Emacs 25 Support
- WordPress coding style removing spaces around function args HOT 1
- The last argument of the method is not highlighted
- PEAR method chaining wrong indentation HOT 5
- File mode specification error HOT 5
- Indentation issue with closure/anonymous functions
- Lineup Cascaded Calls doesn't work properly
- emacs master results in error HOT 2
- Drop Emacs 26 Support
- Newline Indentation aligning with equal sign HOT 3
- while keyword says 'At top level' HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from php-mode.