Citre mode will overwrite imenu-create-index-function when citre-enable-imenu-integration is t.
However, this might create problem if the user also has other imenu backend, e.g. eglot-imenu, or the imenu from the built-in xxxx-ts-mode since emacs 29. and want to use multiple imenu backends all at once.
Here is the piece of code of how eglot is handling the imenu:
Citre mode will overwrite
imenu-create-index-function
whencitre-enable-imenu-integration
ist
.However, this might create problem if the user also has other imenu backend, e.g.
eglot-imenu
, or the imenu from the built-inxxxx-ts-mode
since emacs 29. and want to use multiple imenu backends all at once.Here is the piece of code of how eglot is handling the imenu:
The takeaway is, instead of overwrite this function, it patches the
imenu-create-index-function
so that previous imenu backend does not remove.This would be something like this and I think this way to use menu integration is a sensible default.