more fully override imenu configuration when using outshine's imenu

When using outshine's imenu functionality (from either `outshine-imenu` or
`outshine-imenu-with-navi-regexp`), the variables that configure imenu behavior
are locally overwritten in a `let*` form. However, it's important to also restore
the default setting of `imenu-create-index-function` (which should be
`imenu-default-create-index-function`).

I noticed this bug when editing `R` files in `spacemacs`: the `lsp`
configuration involves changing the value of `imenu-create-index-function`,
which makes changes to the other variables inconsequential, and then outshine's
attempt to change the way imenu works by binding `imenu-generic-expression` has
no effect.
master^2
Dan Kessler 4 years ago
parent 9334b555aa
commit f4af4a1e36
  1. 2
      outshine.el

@ -2143,6 +2143,7 @@ i.e. the text following the regexp match until the next space character."
outshine-imenu-generic-expression) outshine-imenu-generic-expression)
(imenu-prev-index-position-function nil) (imenu-prev-index-position-function nil)
(imenu-extract-index-name-function nil) (imenu-extract-index-name-function nil)
(imenu-create-index-function 'imenu-default-create-index-function)
(imenu-auto-rescan t) (imenu-auto-rescan t)
(imenu-auto-rescan-maxout 360000)) (imenu-auto-rescan-maxout 360000))
;; prefer idomenu ;; prefer idomenu
@ -2173,6 +2174,7 @@ i.e. the text following the regexp match until the next space character."
outshine-imenu-default-generic-expression) outshine-imenu-default-generic-expression)
(imenu-prev-index-position-function nil) (imenu-prev-index-position-function nil)
(imenu-extract-index-name-function nil) (imenu-extract-index-name-function nil)
(imenu-create-index-function 'imenu-default-create-index-function)
(imenu-auto-rescan t) (imenu-auto-rescan t)
(imenu-auto-rescan-maxout 360000)) (imenu-auto-rescan-maxout 360000))
;; prefer idomenu ;; prefer idomenu

Loading…
Cancel
Save