Skip to content

Use eldoc-documentation hook instead of variable - #211

Open
mohkale wants to merge 1 commit into
leoliu:masterfrom
mohkale:eldoc-hook
Open

Use eldoc-documentation hook instead of variable#211
mohkale wants to merge 1 commit into
leoliu:masterfrom
mohkale:eldoc-hook

Conversation

@mohkale

@mohkale mohkale commented Sep 2, 2021

Copy link
Copy Markdown

Not sure which version of emacs added using hooks for eldoc instead of the eldoc variable so this may require bumping the minimum supported version.

Advantage of the new approach:

  • Allows usage of multiple eldoc functions (for example flymake and ggtags).
  • The above but also simultaneously. You can make eldoc show both lint and doc messages at the same time.

@leoliu

leoliu commented Sep 2, 2021

Copy link
Copy Markdown
Owner

eldoc-documentation-function is the preferred way for many releases including Emacs 27. eldoc-documentation-functions appeared at some point long long ago.

@mohkale

mohkale commented Sep 2, 2021

Copy link
Copy Markdown
Author

@leoliu

Wow that's really recent. If that's the case then I can understand avoiding using the new hooks style until a few more emacs releases. I made this PR because I saw eldoc-message was deprecated in eldoc-1.1.0 meaning so was eldoc-documentation-function.

If you'd like you can close this issue. I'll probably re-open it when the need for this becomes more apparrent.

@leoliu

leoliu commented Sep 2, 2021

Copy link
Copy Markdown
Owner

There may be some recent change I am not aware of. will take a closer look later today. thanks for the PR :)

@leoliu

leoliu commented Sep 2, 2021

Copy link
Copy Markdown
Owner

I check the copy of eldoc.el on http://git.savannah.gnu.org/cgit/emacs.git/plain/lisp/emacs-lisp/eldoc.el and it seems there is incompatible changes likely to appear in emacs 28. Don't know why eldoc-documentation-function is removed instead of deprecated which will break many setups unnecessarily.

@mohkale

mohkale commented Sep 5, 2021

Copy link
Copy Markdown
Author

@leoliu

Looking back on it you mention the hooks support has been in emacs for a while. Wouldn't that mean you can migrate ggtags to the hooks API and still support emacs's older than 27. Since eldoc-documentation-function is being removed and eldoc-documentation-functions is still available even on earlier releases, migrating seems like a win-win to me. Thoughts?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants