-
Notifications
You must be signed in to change notification settings - Fork 145
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
Cleanup #369
base: master
Are you sure you want to change the base?
Cleanup #369
Conversation
SLY should now compile cleanly (no warnings). |
I don't think you should remove the obsoletion warning, or at least not like this. Last time I checked (but it was a while ago), SLY worked in Emacs 24.3. Usually, I'm careful when adding stuff (and reviewing stuff), that I don't use any recent or bleeding-edge constructs that aren't available in that version. On the other hand, it's likely that something slipped by and SLY isn't 100% Emacs 24.3-compliant anyway. |
I haven't removed any obsoletion warning, what do you mean? |
Sorry if I wasn't clear:
|
- Is `font-lock-ensure` in Emacs 24.3?If it's not, you will have fixed the warning, but broken part of SLY's compatibility to that Emacs version. If it is, no problem.
I'm not sure, I'll check the source of Emacs 24.3 later.
I found this in CIDER in the meantime:
--8<---------------cut here---------------start------------->8---
(defalias 'cider--font-lock-ensure
(if (fboundp 'font-lock-ensure)
#'font-lock-ensure
(with-no-warnings
(lambda (&optional _beg _end)
(when font-lock-mode
(font-lock-fontify-buffer))))))
--8<---------------cut here---------------end--------------->8---
- Also, `buffer-file-path` is a bad name. "path" is purposedly avoided in Elisp, for reasons I don't recall right now, but it just is. Just name it `file-name` to avoid the shadowing.
OK.
|
I confirm the font-lock-ensure is not in Emacs 24.3.
Should I use the CIDER alias (as `sly--font-lock-ensure`)?
|
…ffer. * contrib/sly-autodoc.el (sly--font-lock-ensure): New compatibility alias that uses font-lock-ensure on modern Emacs, or resorts to a warning-free alternative on Emacs 24.3. (sly-autodoc--fontify): Use sly--font-lock-ensure instead of font-lock-fontify-buffer.
* contrib/sly-fancy-trace.el (sly-trace-query): Replace lexical "n" with "_n" to muffle compilation warning.
* contrib/sly-package-fu.el (sly-find-possible-package-file): Rename lexical buffer-file-name to file-name to avoid accidental shadowing of dynamic buffer-file-name.
* contrib/sly-mrepl.el (sly-mrepl--copy-objects-to-repl): Do it.
Patch updated.
|
Friendly ping :) Let me know if there is anything that I can do to help. |
No description provided.