[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 2e8212a: Fix problem with empty command histories in eshell and `
From: |
Lars Ingebrigtsen |
Subject: |
master 2e8212a: Fix problem with empty command histories in eshell and `erase' |
Date: |
Thu, 3 Jun 2021 03:50:41 -0400 (EDT) |
branch: master
commit 2e8212a56548d0de74c2f3c3abe72222368ae0c6
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>
Fix problem with empty command histories in eshell and `erase'
* lisp/eshell/em-hist.el (eshell-add-input-to-history): Protect
against an empty ring (bug#48770).
---
lisp/eshell/em-hist.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lisp/eshell/em-hist.el b/lisp/eshell/em-hist.el
index e559f5b..18e19a9 100644
--- a/lisp/eshell/em-hist.el
+++ b/lisp/eshell/em-hist.el
@@ -379,7 +379,7 @@ input."
(if (eq eshell-hist-ignoredups 'erase)
;; Remove any old occurrences of the input, and put
;; the new one at the end.
- (progn
+ (unless (ring-empty-p eshell-history-ring)
(ring-remove eshell-history-ring
(ring-member eshell-history-ring input))
t)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 2e8212a: Fix problem with empty command histories in eshell and `erase',
Lars Ingebrigtsen <=