mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-03 12:27:26 -05:00
emacs/imenu: remove cleanup-on-popup-close hack
This hack is no longer necessary now that imenu-list-smart-toggle exists. And set :quit nil for the Ilist popup rule (since it can be toggled externally).
This commit is contained in:
@ -8,14 +8,4 @@
|
|||||||
(setq imenu-list-idle-update-delay 0.5)
|
(setq imenu-list-idle-update-delay 0.5)
|
||||||
|
|
||||||
(set-popup-rule! "^\\*Ilist"
|
(set-popup-rule! "^\\*Ilist"
|
||||||
:side 'right :size 35 :quit 'current :select nil :ttl 0)
|
:side 'right :size 35 :quit nil :select nil :ttl 0))
|
||||||
|
|
||||||
(defun +imenu|cleanup-on-popup-close ()
|
|
||||||
"Clean up after `imenu-list-minor-mode' when killing the list window."
|
|
||||||
(unless +popup-buffer-mode
|
|
||||||
(when imenu-list--displayed-buffer
|
|
||||||
(with-current-buffer imenu-list--displayed-buffer
|
|
||||||
(imenu-list-minor-mode -1)))
|
|
||||||
(when (equal (buffer-name) imenu-list-buffer-name)
|
|
||||||
(kill-buffer (get-buffer imenu-list-buffer-name)))))
|
|
||||||
(add-hook '+popup-buffer-mode-hook #'+imenu|cleanup-on-popup-close))
|
|
||||||
|
Reference in New Issue
Block a user