-
-
Notifications
You must be signed in to change notification settings - Fork 267
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
Advice rainbow-turn-on causes an error #110
Comments
@tarsius I'll disable this, since I got a ton of complaints. |
@bbatsov were there more complaints I cannot see? The first issue we fixed and here I still cannot see anything with the code I added (not saying there ain't nothing wrong, just can't see it). @wujiang could you try replacing I still cannot reproduce this. I intentionally added an error to the rainbow-turn-on advice, which causes an error message but no error to be raised. Edit: which I think is the same you are seeing, right? Edit: I will look for a way to enable debugging during advices. |
@tarsius For myself, I just deleted it since I'm not using |
@tarsius Have at look at Prelude's tracker - bbatsov/prelude#318 bbatsov/prelude#319 (Prelude uses Zenburn by default, so generally bugs are reported there instead of here) |
@tarsius Any progress with this? |
Sorry no. I intend to have another look soon. |
I originally implemented these advices in #106. They got commented out in 27cee3d in response to #110 and similar reports in prelude's issue tracker. I just implemented the same thing again, only to find the commented advices once I was done... five years later... it seem I would very much like this. So I had a look at the reports and it seems pretty obvious what the issue was: just because the major-mode is `emacs-lisp-mode', that does not mean that the buffer is visiting a file. And the fix is to check whether the buffer is visiting a file before trying to do something with the `buffer-file-name'. Besides reverting the commenting and fixing the bug, this commit also does the following: - Use `zenburn-default-colors-alist' because that variable has since been renamed. - Add out keywords at the end because otherwise the "blue" in "zenburn-blue" for example would have "blue" as the background color instead of "zenburn-blue". - Extend the doc-string of `zenburn-add-font-lock-keywords' to make users aware of a complication.
I originally implemented these advices in bbatsov#106. They got commented out in 27cee3d in response to bbatsov#110 and similar reports in prelude's issue tracker. I just implemented the same thing again, only to find the commented advices once I was done... five years later... it seem I would very much like this. So I had a look at the reports and it seems pretty obvious what the issue was: just because the major-mode is `emacs-lisp-mode', that does not mean that the buffer is visiting a file. And the fix is to check whether the buffer is visiting a file before trying to do something with the `buffer-file-name'. Besides reverting the commenting and fixing the bug, this commit also does the following: - Use `zenburn-default-colors-alist' because that variable has since been renamed. - Add out keywords at the end because otherwise the "blue" in "zenburn-blue" for example would have "blue" as the background color instead of "zenburn-blue". - Extend the doc-string of `zenburn-add-font-lock-keywords' to make users aware of a complication.
This advice breaks the zenburn package.
The error message is
24.3.1
and24.3.50.1
20130513.1724
0.8
Running
emacs --debug-init
did not give more information about the error.The text was updated successfully, but these errors were encountered: