summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/eshell/em-hist.el3
-rw-r--r--lisp/eshell/esh-mode.el6
2 files changed, 6 insertions, 3 deletions
diff --git a/lisp/eshell/em-hist.el b/lisp/eshell/em-hist.el
index 99158c76863..5c6e6291209 100644
--- a/lisp/eshell/em-hist.el
+++ b/lisp/eshell/em-hist.el
@@ -55,6 +55,7 @@
;;; Code:
(eval-when-compile (require 'cl-lib))
+(eval-when-compile (require 'subr-x)) ; `string-blank-p'
(require 'ring)
(require 'esh-opt)
@@ -208,7 +209,7 @@ element, regardless of any text on the command line. In that case,
(defun eshell-input-filter-default (input)
"Do not add blank input to input history.
Returns non-nil if INPUT is blank."
- (not (string-match "\\`\\s-*\\'" input)))
+ (not (string-blank-p input)))
(defun eshell-input-filter-initial-space (input)
"Do not add input beginning with empty space to history.
diff --git a/lisp/eshell/esh-mode.el b/lisp/eshell/esh-mode.el
index b1195c9e1de..0fd0c183016 100644
--- a/lisp/eshell/esh-mode.el
+++ b/lisp/eshell/esh-mode.el
@@ -882,8 +882,10 @@ If SCROLLBACK is non-nil, clear the scrollback contents."
(interactive)
(if scrollback
(eshell/clear-scrollback)
- (insert (make-string (window-size) ?\n))
- (eshell-send-input)))
+ (let ((eshell-input-filter-functions
+ (remq 'eshell-add-to-history eshell-input-filter-functions)))
+ (insert (make-string (window-size) ?\n))
+ (eshell-send-input))))
(defun eshell/clear-scrollback ()
"Clear the scrollback content of the eshell window."