This repository has been archived on 2024-10-22. You can view files and clone it, but cannot push or open issues or pull requests.
spacemacs/layers/+tools/imenu-list/funcs.el

10 lines
425 B
EmacsLisp
Raw Normal View History

(defun spacemacs/imenu-list-smart-focus ()
"Focus the `imenu-list' buffer, creating as necessary.
If the imenu-list buffer is displayed in any window, focus it, otherwise create and focus.
Note that all the windows in every frame searched, even invisible ones, not
only those in the selected frame."
(interactive)
(if (get-buffer-window imenu-list-buffer-name t)
(imenu-list-show)
(imenu-list-smart-toggle)))