pythonic-emacs / anaconda-mode

Code navigation, documentation lookup and completion for Python.
GNU General Public License v3.0
707 stars 87 forks source link

Fix assertion failure on Emacs 27 for xref #365

Closed TerryTsao closed 5 years ago

TerryTsao commented 5 years ago

Emacs 27 changes xref--show-xrefs to accept a function as the 1st argument.

This commit attempts to fix that issue based on several discussion and by copying almost every line from several commits from this link: https://github.com/emacs-lsp/lsp-mode/issues/898

I've written only a few lines of Elisp before, so please let me know if anything done here is inappropriate or incorrect.

Also, I've minimally tested it under Spacemacs develop branch w/ Emacs 26.1 and 27.0.50.

HTH.

proofit404 commented 5 years ago

Thanks! Let's try it.

No worries about your elisp skills. We can revert PR at any time.

Best regards, Artem.

Technologicat commented 4 years ago

At least in my installation (Spacemacs develop #9637ceb3, on Emacs 27.0.50 2019-08-20), I had to change xref--pop-to-location in the proposed fix to xref-pop-to-location. The function has been made public, see this commit by Dmitry Gutov.

Then the fix worked perfectly. Thanks!