> > Thanks, finally there is an option to avoid typing extra C-r. > :-) And thanks for your feedback! > > Is it possible to find a clearer name? > Maybe isearch-repeat-on-direction-change would be better with the prefix > 'isearch-repeat-' to hint that it applies to the commands > 'isearch-repeat-*'? > Done. > > This breaks the following feature: > > When isearch-forward is t: > - C-1 C-r moves to the previous match (like your patch does without 'C-1') > - C-2 C-r moves to the second previous match > - C-u -1 C-r moves to the next match > - C-u -2 C-r moves to the second next match > > This is due to these lines in isearch-repeat-backward: > > ;; Reverse the direction back > (isearch-repeat 'backward)) > (t > ;; Take into account one iteration to reverse direction > (when isearch-forward (setq count (1+ count))) > > When the new option is non-nil, there is no need to increment 'count'. > Also the new option should be let-bound to nil around the call to > '(isearch-repeat 'backward)' above to just change the direction back > without moving to the next match. > > The same applies to isearch-repeat-forward and when isearch-forward is nil. > Fixed, thank you!