Files
.emacs.d/modules/siren-project-explorer.el
Jim Myhrberg c791150a06 Add rewritten config, dubbed emacs-siren
I've taken a lot of inspiration from Emacs-Prelude when it came to the
structure of this rewritten config. I didn't want to use Prelude as I
don't agree with all it's defaults, nor do I want to have to deal with
any future changes in Prelude that might break things for me. So instead
I went down the fully custom path, but heavily inspired by Prelude, both
in terms of file/code structure, and also some of it's features.

Compared to my old config setup, it's got most of the same things, but
nearly everything is in a module file now, making it easy to fully
enable/disable certain features.
2015-10-04 08:56:07 +01:00

31 lines
936 B
EmacsLisp

;;
;; project-explorer
;;
(siren-require-packages '(project-explorer))
(require 'project-explorer)
(setq pe/follow-current t)
(setq pe/width 54)
(setq pe/cache-directory (expand-file-name
"project-explorer-cache" siren-savefile-dir))
(global-set-key (kbd "C-x p") 'project-explorer-open)
;; Make Project Explorer open selected file in last used buffer
(setq pe/display-content-buffer-function
(lambda (buffer)
(let* (( last-buffer
(car (cl-remove 'project-explorer-mode
(buffer-list)
:key (apply-partially 'buffer-local-value
'major-mode))))
( window (get-buffer-window last-buffer)))
(if window
(set-window-buffer window buffer)
(pe/show-buffer buffer)))
))
(provide 'siren-project-explorer)