From 34fc55b75edd5c809134e418702abc2b3d0c8146 Mon Sep 17 00:00:00 2001 From: JSDurand Date: Tue, 18 May 2021 15:31:32 +0800 Subject: Make eshell-clear a separate function. * eshell-conf.el (eshell-clear): Refactor into a standalone function. --- eshell-conf.el | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/eshell-conf.el b/eshell-conf.el index 6bb255a..59a0150 100644 --- a/eshell-conf.el +++ b/eshell-conf.el @@ -41,11 +41,14 @@ (defun durand-set-eshell-keys () "Set my key-bindings." (define-key eshell-mode-map (vector #xf) ; C-o - (lambda () - (interactive) - (delete-region eshell-last-output-end (point)) - (insert "clear t") - (eshell-send-input)))) + #'eshell-clear)) + +;;;###autoload +(defun eshell-clear () + (interactive) + (delete-region eshell-last-output-end (point)) + (insert "clear t") + (eshell-send-input)) ;;;###autoload (defun eshell/j (&rest args) -- cgit v1.2.3-18-g5258