From b2500e019d6427ca63b8152e47d125301c650bed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Sat, 27 Aug 2022 02:07:53 +0200 Subject: eb.el: Minor improvements. Perhaps this should be a separate Emacs package named ide-tool-bar. --- eb.el | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'eb.el') diff --git a/eb.el b/eb.el index 7477372..14d6aed 100644 --- a/eb.el +++ b/eb.el @@ -73,11 +73,21 @@ (defun eb-dired () "Open the root of the current project with `dired'." (interactive) + (require 'project) + (when eb--list-buffers (quit-window)) (let ((project-root (project-root (project-current)))) (if (and (eq major-mode 'dired-mode) (equal default-directory project-root)) (bury-buffer) (dired project-root)))) +;;;###autoload +(defun eb-vc () + "Open version control for project." + (interactive) + (require 'projectile) + (when eb--list-buffers (quit-window)) + (call-interactively #'projectile-vc)) + ;;;###autoload (defun eb-quit-or-bury () "Quit window or bury buffer." @@ -116,7 +126,7 @@ :label "Compile" :help "Compile project") (tool-bar-local-item "search-replace" #'projectile-grep 'grep map :label "Grep" :help "Grep project") - (tool-bar-local-item "connect" #'projectile-vc 'vc map + (tool-bar-local-item "connect" #'eb-vc 'vc map :label "Version Control" :help "Open project version control") (define-key-after map [separator-2] menu-bar-separator) -- cgit v1.2.3