irony-mode
irony-mode copied to clipboard
Irony and php-mode compatibility issues
Hello:
I mentioned this issue in #410 .
I revisit this because I think that this feature needs to be improved, not just provide a workaround.
Because php-mode wakes up c-mode, this is not a configuration issue, but it's Emacs defaults.
Sorry for my poor English.
Thank you very much!
I don't consider my answer a "workaround". Do you have something in mind that would be better?
I also have no idea, because until now I am still an ELisp rookie, Sorry.
I don't know if there is any way to hide this error, or do support php-mode ...... but I can think of that is a huge project. I personally prefer to hide the error and not enable irony-mode, and write it out in the README.
In addition, I think it is a workaround because I have to start irony-mode in another way...
@Sarcasm I can't seem to find any good way to solve this problem...
I can only think of two ways to solve this problem now:
- Add your answer in #410 to the README as the default configuration for enabling irony-mode.
- Hide the error message and turn off irony-mode in PHP mode.
I think there are still a lot of people who use both irony-mode and php-mode...so I think it is necessary to add a description for this.
And... about the function in your answer, I have the following changes:
(defun my-enable-irony-mode ()
(when (memq major-mode '(c-mode c++-mode objc-mode))
(irony-mode 1)))
This avoids irony-supported-major-modes
is void when lazy load irony-mode.
Thanks.