>From 7d4843ecc817036158e77a3819f1545604602543 Mon Sep 17 00:00:00 2001 From: Brian Leung Date: Tue, 25 Aug 2020 22:06:51 -0700 Subject: [PATCH] eshell: Remove unnecessary check in em-hist Both before and within the while loop, n is always between [0, len] inclusive. Copyright-paperwork-exempt: yes --- 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 267936583e..5cee1bad36 100644 --- a/lisp/eshell/em-hist.el +++ b/lisp/eshell/em-hist.el @@ -862,7 +862,7 @@ eshell-previous-matching-input-string-position (setq prev n n (mod (+ n motion) len)) ;; If we haven't reached a match, step some more. - (while (and (< n len) (not tried-each-ring-item) + (while (and (not tried-each-ring-item) (not (string-match regexp (eshell-get-history n)))) (setq n (mod (+ n motion) len) ;; If we have gone all the way around in this search. -- 2.28.0