diff options
author | Amin Bandali <bandali@kelar.org> | 2025-02-10 15:05:56 -0500 |
---|---|---|
committer | Amin Bandali <bandali@kelar.org> | 2025-02-10 15:05:56 -0500 |
commit | 70026d07d0bef09468b93caabf9a1f425533a69a (patch) | |
tree | c5379ac39bff3fb3e818eba88844c136c7e1c239 /.emacs.d/lisp/bandali-eshell.el | |
parent | 99332da43b8324814ca6c1af7f0076f83c8ce233 (diff) | |
download | configs-70026d07d0bef09468b93caabf9a1f425533a69a.tar.gz configs-70026d07d0bef09468b93caabf9a1f425533a69a.tar.xz configs-70026d07d0bef09468b93caabf9a1f425533a69a.zip |
Drop use-package again
I prefer my own manual approach, use-package feels too magical and
at times does too much for me.
Diffstat (limited to '.emacs.d/lisp/bandali-eshell.el')
-rw-r--r-- | .emacs.d/lisp/bandali-eshell.el | 42 |
1 files changed, 17 insertions, 25 deletions
diff --git a/.emacs.d/lisp/bandali-eshell.el b/.emacs.d/lisp/bandali-eshell.el index e9476cd..4b96f91 100644 --- a/.emacs.d/lisp/bandali-eshell.el +++ b/.emacs.d/lisp/bandali-eshell.el @@ -24,15 +24,12 @@ ;;; Code: -(use-package eshell - :defer t - :bind - ("C-c s e" . eshell) - :custom - (eshell-hist-ignoredups t) - (eshell-input-filter #'eshell-input-filter-initial-space) - (eshell-prompt-regexp "^[^#$\n]* [#$] ; ") - (eshell-prompt-function +(with-eval-after-load 'eshell + (setopt + eshell-hist-ignoredups t + eshell-input-filter #'eshell-input-filter-initial-space + eshell-prompt-regexp "^[^#$\n]* [#$] ; " + eshell-prompt-function (lambda () (let ((uid (if (functionp #'file-user-uid) #'file-user-uid ; (version<= "30" emacs-version) @@ -44,11 +41,9 @@ (unless (eshell-exit-success-p) (format " [%d]" eshell-last-command-status)) (if (= (funcall uid) 0) " # " " $ ") - "; "))))) + "; ")))) -(use-package esh-mode - :after eshell - :init + ;; `esh-mode' (eval-when-compile (defvar eshell-prompt-regexp) (declare-function eshell-life-is-too-much "esh-mode") @@ -64,23 +59,20 @@ (let ((inhibit-read-only t)) (erase-buffer)) (eshell-send-input)) - :bind - (:map - eshell-mode-map - ("C-d" . b/eshell-quit-or-delete-char) - ("C-S-l" . b/eshell-clear))) + (with-eval-after-load 'esh-mode + (let ((m eshell-mode-map)) + (b/keymap-set m "C-d" #'b/eshell-quit-or-delete-char) + (b/keymap-set m "C-S-l" #'b/eshell-clear))) -(use-package esh-hist - :after eshell - :init + ;; `esh-hist' (defun b/eshell-history () (interactive) (completing-read "Eshell history: " (ring-elements eshell-history-ring))) - :bind - (:map - eshell-hist-mode-map - ("M-r" . b/eshell-history))) + (with-eval-after-load 'esh-hist + (let ((m eshell-hist-mode-map)) + (b/keymap-set m "M-r" #'b/eshell-history)))) +(b/keymap-global-set "C-c s e" #'eshell) (provide 'bandali-eshell) ;;; bandali-eshell.el ends here |