branch: externals/javaimp commit e24822e89171963069536e36da672169e1218fbd Author: Filipp Gunbin <fgun...@fastmail.fm> Commit: Filipp Gunbin <fgun...@fastmail.fm>
* javaimp.el (javaimp-imenu-create-index): Update doc --- javaimp.el | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/javaimp.el b/javaimp.el index abe7653..2c0b4af 100644 --- a/javaimp.el +++ b/javaimp.el @@ -606,7 +606,17 @@ is `ordinary' or `static'. Interactively, NEW-IMPORTS is nil." ;;;###autoload (defun javaimp-imenu-create-index () - "Function to use as `imenu-create-index-function'." + "Function to use as `imenu-create-index-function'. + +Currently it requires some manual setup, something like this in +the `java-mode-hook': + + (setq imenu-create-index-function #'javaimp-imenu-create-index) + (setq javaimp--parse-dirty-pos (point-min)) + (add-hook 'after-change-functions #'javaimp--parse-update-dirty-pos) + +In future, when we implement a minor / major mode, it will be +done in mode functions automatically." (let ((forest (save-excursion (javaimp--parse-get-imenu-forest)))) (cond ((not javaimp-imenu-group-methods)