From e1f2c223448901c09e1df0d87284405a094ff0a7 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Tue, 10 May 2016 00:33:13 +0200 Subject: Configure eshell using use-package --- emacs/.emacs.d/init.el | 42 ++++++++++++++++++++++++------------------ 1 file 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 (("" . 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 "") 'git-project-show-files) (global-set-key (kbd "") 'oni:reload-buffer) (global-set-key (kbd "") 'magit-status) -(global-set-key (kbd "") 'oni:raise-eshell) (global-set-key (kbd "") 'oni:show-org-index) (global-set-key (kbd "") 'oni:scroll-up-or-next-page) (global-set-key (kbd "") 'oni:scroll-down-or-prev-page) -- cgit v1.2.3-54-g00ecf