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:
Henrik Lissner 2018-06-30 23:27:06 +02:00
parent eebe852de4
commit 866c97bcb2
No known key found for this signature in database
GPG Key ID: 5F6C0EA160557395

View File

@ -8,14 +8,4 @@
(setq imenu-list-idle-update-delay 0.5)
(set-popup-rule! "^\\*Ilist"
:side 'right :size 35 :quit 'current :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))
:side 'right :size 35 :quit nil :select nil :ttl 0))