-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ERL-1474: emacs mode still requires cl which was deprecated in emacs 27.1 #4451
Comments
On startup, I also see this warning in my emacs(GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.5, cairo version 1.16.0) of 2020-09-26). As per 1015, and as per @kjellwinblad 's comment. However, a quick rgrep of emacs folder yields on branch master, erlang.el and erlang-test.el entries as such Any tips please? Can these entries be removed, as they already have been in few other files, as per the comment. |
auto-highlight-symbol-mode has a dependency on (require 'cl). At least this is the one I am loading from source. In my emacs config I am doing (require 'edts-start)
Hence the warning, even though the 2 entries mentioned in previous comment are taken away. |
I removed (require 'edts-start) and added (require 'erlang) in my emacs config, and the warning is back. That means, with the current erlang.el and erlang-test.el, this warning still shows up. |
Changing the entries from (require 'cl) to (require 'cl-lib) takes away the warning on launch of Emacs, but leaves with 2 entries in Messages buffer:-
|
The following fixes deprecation warnings.
|
Thanks @leoliu . There are many things in the diff, apart from the 2 points that I have noticed so far. I will follow through it.
|
For Q2, I also do some cleanup by removing the hack for lack of I will see if I can send a PR in a day or two. Thanks. |
I was going to create a PR just now but discovered that the |
It depends. Generally, bug fixes are done for the maint branch and feature additions are done for the master branch. If you can not make a solution to maint that can be merged to master because of diverged code and master needs a different solution then it becomes a little more complicated and I think only the OTP team has handled such changes so far. So if that is the case I think it would be easiest to base it on the master branch. |
In this case I don't think the merge will cause any problems so you can do as you want if it still works on old emacs |
Do not depend on cl. Assume presence of before-save-hook (Emacs 22) and remove erlang-check-module-name-init. Remove (run-hooks 'erlang-mode-hook) from erlang-mode definition because define-derived-mode does it already. Replace erlang-caddr with caddr from Emacs 26. erlang.el now compiles cleanly in Emacs 24.5, 25, 26, 27.
Sorry my bad. I just discovered I have a stale OTP fork from 2017 that is causing the divergence. |
tools: Fix emacs compiler warnings (#4451) OTP-17225
Fix merged to maint and master. |
Original reporter:
JIRAUSER13400
Affected version:
Not Specified
Component:
Not Specified
Migrated from: https://bugs.erlang.org/browse/ERL-1474
The text was updated successfully, but these errors were encountered: