> > I get much better scrolling experience with these properties: > > (put 'scroll-up-command 'isearch-motion > '((lambda () (goto-char (window-end)) (recenter 1 t)) . forward)) > (put 'scroll-down-command 'isearch-motion > '((lambda () (goto-char (window-start)) (recenter -1 t)) . backward)) > > so only new unseen matches are highlighted. > Indeed, I tried them, and I agree with you that these properties give a better experience. >> + (when (and isearch-success (not isearch-motion-changes-direction)) >> + (unless (eq direction current-direction) >> + (let ((isearch-repeat-on-direction-change nil)) >> + (isearch-repeat current-direction)))) > > This 'isearch-repeat' is broken when the new option > 'isearch-repeat-on-direction-change' is customized to t. > Fixed. > > Also in this case the old commands isearch-beginning-of-buffer and > isearch-end-of-buffer are broken too. Maybe you need to wrap their > calls of 'isearch-repeat' with > > (let ((isearch-repeat-on-direction-change nil)) > (isearch-repeat 'forward arg)) > Indeed, it is necessary to let-bind isearch-repeat-on-direction-change to nil there, like elsewhere. I attach a separate patch, because it's not related to the isearch-allow-motion patch.