summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Tom Willemse2016-05-10 00:33:13 +0200
committerGravatar Tom Willemse2016-05-10 00:33:13 +0200
commite1f2c223448901c09e1df0d87284405a094ff0a7 (patch)
treed4019d18f90cfc1ac1c4674780f5f59c1273208c
parent3a586dd03f7efe7b8c025540142020f31c509c18 (diff)
downloaddotfiles-e1f2c223448901c09e1df0d87284405a094ff0a7.tar.gz
dotfiles-e1f2c223448901c09e1df0d87284405a094ff0a7.zip
Configure eshell using use-package
-rw-r--r--emacs/.emacs.d/init.el42
1 files changed, 24 insertions, 18 deletions
diff --git a/emacs/.emacs.d/init.el b/emacs/.emacs.d/init.el
index 7949b92..58eb0c6 100644
--- a/emacs/.emacs.d/init.el
+++ b/emacs/.emacs.d/init.el
@@ -129,7 +129,6 @@ MODE1 is enabled and vice-versa."
;;;;; Vacuous
(defvar elnode-do-init)
-(defvar eshell-prompt-regexp)
(defvar gnus-init-file)
(defvar sql-product)
(defvar sql-prompt-regexp)
@@ -237,16 +236,6 @@ MODE1 is enabled and vice-versa."
(stante-after eltuki
(setq eltuki-blog-dir "~/documents/blog"))
-(stante-after em-prompt
- (setq eshell-highlight-prompt nil))
-
-(stante-after em-term
- (add-to-list 'eshell-visual-commands "unison"))
-
-(stante-after esh-mode
- (add-to-list 'eshell-output-filter-functions 'oni:eshell-buttonize-url)
- (add-to-list 'eshell-output-filter-functions #'eshell-truncate-buffer))
-
(stante-after eww
(setq eww-download-directory ; Don't go to ~/Downloads
"~/downloads/"))
@@ -453,6 +442,30 @@ MODE1 is enabled and vice-versa."
(use-package apache-mode :ensure t :defer t)
+(use-package eshell
+ :bind (("<f8>" . oni:raise-eshell))
+ :config
+ (add-hook 'eshell-first-time-mode-hook 'oni-eshell-set-prompt)
+ (add-hook 'eshell-mode-hook 'buffer-disable-undo)
+ (add-hook 'eshell-mode-hook 'oni:set-keys-for-eshell)
+ (add-hook 'eshell-mode-hook 'eshell-fringe-status-mode))
+
+(use-package em-prompt
+ :defer t
+ :config
+ (setq eshell-highlight-prompt nil))
+
+(use-package em-term
+ :defer t
+ :config
+ (add-to-list 'eshell-visual-commands "unison"))
+
+(use-package esh-mode
+ :defer t
+ :config
+ (add-to-list 'eshell-output-filter-functions 'oni:eshell-buttonize-url)
+ (add-to-list 'eshell-output-filter-functions 'eshell-truncate-buffer))
+
(use-package helm
:ensure t
:bind (("M-x" . helm-M-x)
@@ -496,8 +509,6 @@ MODE1 is enabled and vice-versa."
;;;; Hooks
-(add-hook 'eshell-first-time-mode-hook 'oni-eshell-set-prompt)
-
;; Automatically make shell scripts executable after saving.
(add-hook 'after-save-hook
'executable-make-buffer-file-executable-if-script-p :append)
@@ -584,10 +595,6 @@ MODE1 is enabled and vice-versa."
'oni:locally-enable-double-spaces 'oni:set-emacs-lisp-symbols
'paredit-mode #'eldoc-mode 'oni:set-emacs-lisp-keys)
-(oni:add-hooks 'eshell-mode-hook
- #'buffer-disable-undo 'oni:set-keys-for-eshell
- 'eshell-fringe-status-mode)
-
(oni:add-hooks 'gnus-summary-mode-hook
(lambda ()
(local-set-key (kbd "M-d") (lambda ()
@@ -705,7 +712,6 @@ MODE1 is enabled and vice-versa."
(global-set-key (kbd "<f10>") 'git-project-show-files)
(global-set-key (kbd "<f5>") 'oni:reload-buffer)
(global-set-key (kbd "<f7>") 'magit-status)
-(global-set-key (kbd "<f8>") 'oni:raise-eshell)
(global-set-key (kbd "<hiragana>") 'oni:show-org-index)
(global-set-key (kbd "<next>") 'oni:scroll-up-or-next-page)
(global-set-key (kbd "<prior>") 'oni:scroll-down-or-prev-page)