arnested / drupal-mode

Advanced Emacs minor mode for Drupal development
https://melpa.org/#/drupal-mode
GNU General Public License v3.0
32 stars 14 forks source link

Eldoc-mode fails with gtags/ggtags #48

Closed kaaresl closed 9 years ago

kaaresl commented 10 years ago

This might be a support request or a bug report, but I can't get the eldoc-documentation-function to point to drupal-eldoc-documentation-function due to this failed test in drupal-mode.el:296

    (when (and drupal-get-function-args
               (fboundp 'eldoc-mode))

Now, ggtags.el for sure sets drupal-get-function-args to drupal/ggtags-get-function-args. I've verified this by examining the variable in the buffer after drupal-mode is loaded, so there is something wrong in the execution order here: The test for drupal-get-function-args is run before ggtags.el's drupal-mode-hook, so eldoc-mode isn't enabled.

So now comes the support request / bug: How can I make ggtags.el's set the value for drupal-get-function-args before the test for eldoc-mode? Is there a trick I can use in my .emacs?

Otherwise, thanks for very nice drupal-mode in emacs. It's by far better than anything else I've tested out there.

kaaresl commented 10 years ago

So yeah, actively setting drupal-get-function-argsto t in my .emacs works, but that's not the way around it? :-)

arnested commented 10 years ago

You are right. There is something wrong with the order of execution.

I'll have to rewrite some things to make this work as intended.

arnested commented 9 years ago

@kaaresl, I might have fixed this problem in 319acd576147144985dbb38d5a5747703c60d2eb without realising it until now or maybe I did fix it but just forgot when I finally committed it (the change had been uncommitted in my working copy for a long time).

Actually right now I'm not even sure if it is really a fix or it just works by accident because of a new order of execution. Too tired to figure it out now.

At least it currently works on my machine. Could you have a look at whether it works for you as well (if you remove the hack in init.el?

kaaresl commented 9 years ago

Without having looked at the code, only removing the hack (setq drupal-get-function-args t), this now works like expected. (using latest from melpa) Thanks!

arnested commented 9 years ago

Cool. I'll just pretend I solved this knowing what I did :smile: