irony-mode icon indicating copy to clipboard operation
irony-mode copied to clipboard

Irony and php-mode compatibility issues

Open yuzumx opened this issue 6 years ago • 3 comments

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!

yuzumx avatar Mar 15 '18 06:03 yuzumx

I don't consider my answer a "workaround". Do you have something in mind that would be better?

Sarcasm avatar Mar 15 '18 20:03 Sarcasm

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...

yuzumx avatar Mar 15 '18 23:03 yuzumx

@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:

  1. Add your answer in #410 to the README as the default configuration for enabling irony-mode.
  2. 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.

yuzumx avatar Sep 04 '18 03:09 yuzumx