diff options
author | John Ankarström <john@ankarstrom.se> | 2022-08-27 02:07:53 +0200 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2022-08-27 02:07:53 +0200 |
commit | b2500e019d6427ca63b8152e47d125301c650bed (patch) | |
tree | 6a1e81c27ad1a150cbd83618e9c46e0e6d5b0987 /eb.el | |
parent | 2f10a264ab96bf53342c9e0042b7d9fedb60ce7f (diff) | |
download | EpisodeBrowser-b2500e019d6427ca63b8152e47d125301c650bed.tar.gz |
eb.el: Minor improvements.
Perhaps this should be a separate Emacs package named ide-tool-bar.
Diffstat (limited to 'eb.el')
-rw-r--r-- | eb.el | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -73,12 +73,22 @@ (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." (interactive) @@ -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) |