From: Brian Leung Date: Wed, 26 Aug 2020 10:01:14 +0000 (+0200) Subject: eshell: Remove unnecessary check in em-hist X-Git-Tag: emacs-28.0.90~6390 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=6d84853de8d4644fcce571e099a5b3443b62bfd4;p=emacs.git eshell: Remove unnecessary check in em-hist * lisp/eshell/em-hist.el (eshell-previous-matching-input-string-position): Both before and within the while loop, n is always smaller than n (bug#43056). Copyright-paperwork-exempt: yes --- diff --git a/lisp/eshell/em-hist.el b/lisp/eshell/em-hist.el index 267936583e1..5cee1bad364 100644 --- a/lisp/eshell/em-hist.el +++ b/lisp/eshell/em-hist.el @@ -862,7 +862,7 @@ Moves relative to START, or `eshell-history-index'." (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.