I am trying to apply following solution(How to jump to backward found word when switched into reverse incremental search?) into Emacs >27.1
, (which works in emacs 26.3):
(define-advice isearch-repeat (:before (direction) goto-other-end) "If reversing, start the search from the other end of the current match." (unless (eq isearch-forward (eq direction 'forward)) (when isearch-other-end (goto-char isearch-other-end))))
But I am having following error message when I use emacs >27.1
:
Wrong number of arguments: (lambda (direction) "If reversing, start the search \
from the other end of the current match." (if (eq isearch-forward (eq direction\
'forward)) nil (if isearch-other-end (progn (goto-char isearch-other-end))))),\
2
How could I fix this error?