浏览代码

Add my-imenu-list-toggle

master
10sr 4 年前
父节点
当前提交
430dc72b03
签署人:: 10sr GPG 密钥 ID: 7BEC428194130EB2
共有 1 个文件被更改,包括 11 次插入2 次删除
  1. +11
    -2
      emacs.el

+ 11
- 2
emacs.el 查看文件

@@ -1230,10 +1230,19 @@ found, otherwise returns nil."
'ggtags-mode)
)

(when (autoload-eval-lazily 'imenu-list)
(when (fboundp 'imenu-list-minor-mode)
(defvar imenu-list-buffer-name)
(defun my-imenu-list-toggle ()
"My 'imenu-list` toggle."
(interactive)
(require 'imenu-list)
(if (eq (window-buffer)
(get-buffer imenu-list-buffer-name))
(imenu-list-minor-mode -1)
(imenu-list-minor-mode 1)))
;; (set-variable 'imenu-list-auto-resize t)
(set-variable 'imenu-list-focus-after-activation t)
(define-key ctl-x-map (kbd "C-l") 'imenu-list-smart-toggle))
(define-key ctl-x-map (kbd "C-l") 'my-imenu-list-toggle))

(add-hook 'emacs-lisp-mode-hook
(lambda ()


正在加载...
取消
保存