]> git.eshelyaron.com Git - emacs.git/commit
Don't return poorly supported "special elements" in eglot-imenu
authorJoão Távora <joaotavora@gmail.com>
Thu, 8 Sep 2022 10:53:11 +0000 (11:53 +0100)
committerJoão Távora <joaotavora@gmail.com>
Thu, 8 Sep 2022 23:37:38 +0000 (00:37 +0100)
commit41a42e631bd798151130097feafa6f535161b9de
tree87f6dcdf57a582dd888cecd8e325030cb1957523
parente5b021c01fceea02b7e6622cde0a347b842ca6f3
Don't return poorly supported "special elements" in eglot-imenu

Fix https://github.com/joaotavora/eglot/issues/758, https://github.com/joaotavora/eglot/issues/536, https://github.com/joaotavora/eglot/issues/535.

Eglot's eglot-imenu returned a structure compliant with the rules
outlined in imenu--index-alist.  In particular, it returned some
elements of the form

  (INDEX-NAME POSITION GOTO-FN ARGUMENTS...)

The original intention (mine) must have been to allow fancy
highlighting of the position navigated to with a custom GOTO-FN.

Not only was access to that fanciness never implemented, but many
other imenu frontends do not support such elements.

See for example https://github.com/joaotavora/eglot/issues/758, https://github.com/joaotavora/eglot/issues/536, https://github.com/joaotavora/eglot/issues/535.  And also related issues in other
packages:

https://github.com/IvanMalison/flimenu/issues/6
https://github.com/bmag/imenu-list/issues/58

So it's best to remove this problematic feature for now.  It can be
added back later.

* eglot.el (eglot-imenu): Simplify.

* NEWS.md: Mention change
lisp/progmodes/eglot.el